Load balancing is critical in a _________ architecture to distribute traffic evenly across servers.

  • client-server
  • microservices
  • monolithic
  • peer-to-peer
Load balancing is critical in a monolithic architecture to distribute traffic evenly across servers.

_________ scaling involves adding more resources to the existing servers.

  • Diagonal
  • Horizontal
  • Parallel
  • Vertical
Horizontal scaling involves adding more resources to the existing servers.

A _________ balancer distributes network or application traffic across a number of servers.

  • Firewall
  • Load
  • Proxy
  • Router
A Load balancer distributes network or application traffic across a number of servers.

In cloud environments, _________ scaling refers to the automated process of adding or removing resources as needed.

  • Elastic
  • Horizontal
  • Static
  • Vertical
In cloud environments, Horizontal scaling refers to the automated process of adding or removing resources as needed, also known as scaling out or in.

An e-commerce website uses auto-scaling but faces downtime during sudden traffic spikes. What might be missing in their scaling strategy?

  • Inadequate Database Scaling
  • Inefficient Caching Strategy
  • Insufficient Monitoring and Alerting
  • Lack of Horizontal Scaling
Downtime during traffic spikes suggests a possible lack of horizontal scaling, where the application fails to dynamically add more instances to handle increased load. Monitoring and alerting can help detect such issues early.

What is the basic difference between horizontal scaling and vertical scaling?

  • Distributing traffic
  • Increasing resources on a server
  • Increasing servers
  • Load balancing
The basic difference is that horizontal scaling increases the number of servers to handle increased load, while vertical scaling involves increasing the resources (CPU, RAM) on a single server.

Which load balancing algorithm distributes requests based on the server with the least connections?

  • Least Connections
  • Random
  • Round Robin
  • Weighted Round Robin
The load balancing algorithm that distributes requests based on the server with the least connections is known as the Least Connections algorithm.

A servlet can __________ to another servlet, JSP, or HTML page using the RequestDispatcher.

  • communicate
  • forward
  • redirect
  • transfer
A servlet can forward to another servlet, JSP, or HTML page using the RequestDispatcher.

In terms of design pattern, which one follows the Model View Controller (MVC) more closely?

  • Both follow MVC equally
  • JSPs
  • Neither follows MVC
  • Servlets
JSPs (JavaServer Pages) follow the Model-View-Controller (MVC) design pattern more closely than Servlets. JSPs provide a clear separation of concerns with HTML as the view, JavaBeans as the model, and tag libraries for controller logic.

Which method is used to get a reference to the ServletContext object?

  • context()
  • getServletConfig()
  • getServletContext()
  • initContext()
The method getServletContext() is used to obtain a reference to the ServletContext object within a servlet.