does elastic load balancer with sticky sessions check for health?

920 views Asked by At

I am developing a chat application and for some reasons I though of configuring the elastic load balancer on aws to use sticky sessions.

Does the load balancer in case of sticky sessions checks for the health of the server required for the request or because the load balancer uses sticky sessions It doesn't care for the health of the server as It will not need any different routing ?

1

There are 1 answers

0
Kamran On BEST ANSWER

The Load balancer does care about the health of a server before routing any new request.

If an instance fails or becomes unhealthy, the load balancer stops routing requests to that instance, and chooses a new healthy instance based on the existing load balancing algorithm. The request is routed to the new instance as if there is no cookie and the session is no longer sticky.

http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-sticky-sessions.html

There is also an option of connection draining which allows your in flight requests to be routed to new server.

To ensure that a Classic Load Balancer stops sending requests to instances that are de-registering or unhealthy, while keeping the existing connections open, use connection draining. This enables the load balancer to complete in-flight requests made to instances that are de-registering or unhealthy.

http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/config-conn-drain.html