I have the following setup in my datacenter.
Global LB --> HA proxy (2 instances on different servers via VRRP, performs HTTPS termination, acts as reverse proxy) ---> Nginx(2 instances on different server, load balanced by HA proxy in round robin, acts as reverse proxy and load balances between tomcat) ---> tomcat( 2 instances, load balanced by each Nginx)
The scenario is as follows:
Global Load balancer receives 100 HTTPS requests/sec. It forwards those 100 requests to HA Proxy. HA proxy performs HTTPS termination and load balances 50 http requests/sec to each nginx. Each Nginx forwards 25 requests/sec to two tomcat instances.
My question has 3 parts regarding to in-flight requests:
- Recover from failure of Nginx: in the above scenario, nginx acting as reverse proxy, load balanced requests to two tomcat servers. Say the machine on which nginx goes down, will it result in failure of 50 requests? As the two tomcat servers can only forward response to nginx, but that nginx is down.
- Recover from failure of HAProxy: HAProxy that had terminated 100 https connection dies. The passive HAProxy will become active, but the https connections will not migrate to the new active HAProxy. what happens in this case? will it result in loss of all 100 requests
- Recover from tomcat failure: If tomcat fails with 25 requests per second, will those 25 requests be transferred to second tomcat instance?
Is there a way to configure stack so that failure in pts 1 and 2 will not result in requests failure?