When each session request is completed, the session is sent to the Memcached node for the backup. This session remains available on the original application server and can be used for serving the next request. After the second request completion, the session is updated in the Memcached.
If the original server fails, the next request is routed to another application server. The newly requested server is asked for the session it doesn’t know. So this new server will find the needed session in the Memcached node. It is identified according to the ID that was appended to the sessionID while session creation. As a result the server can fetch the session from the Memcached node.
When the server answers the request, it also updates the session in the Memcached node. Thus there is no interruption of the app caused by the original server failure – the failover is successfully handled.
At the same time, the NGINX load balancer is distributing traffic across the cluster containing HTTP resources. You can check the load balancing in the CirrusGrid cloud using different load balancing tools.