Installing a load balancer

You can use any appropriate load balancer. Please follow the procedures described in the load balancer's documentation when installing or configuring it.

You can cluster at the request or session-level. Request level means that each request may go to a different node - this is the ideal since the traffic would be balanced across all nodes, and if a node goes down, the user has no idea. This requires session sharing between all nodes.

Sessionlevel clustering means if your application is one that requires a login or other forms of session-state, all the requests for a user session will go to a single node. If you configure session replication and one or more your nodes go down, on their next request, the user will not be asked to log in again since their stored session is available on the node that serves the request. And you still get the benefits of load balancing across nodes, which allows us to scale our application out horizontally across many machines.