0
votes

I have an application with a classic load balancer in front of it. Whenever we change the DNS(which points to load balancer) to a new load balancer(and hence new environment), the traffic from clients take huge amount of time to migrate to new environment.

I investigated and found that the clients are having a persistent connections with load balancers. I looked up into settings of AWS ELB and did not find anything for the connections between client and ELB. I am looking for something like maxKeepAliveRequests which would essentially means that after every ${maxKeepAliveRequests} requests the client has to reconnect freshly.

I see tomcat supporting configurations like this. Not sure what are my options with load balancers.

1

1 Answers

1
votes

An application load balancer has an idle connection timeout during which time if no data is sent back and forth between the client and load balancer the connection will be dropped.

If this timeout is exceeded the connection will drop, however this would not just be a migration between load balancers (this would happen all of the time).

The other thing to consider is your DNS resolution with particular care to the TTL of the record. You should keep these low during any record change to allow a quick rollout/rollback if needed.

If the TTLs are kept low all clients should transition to the new DNS in a short period which will forward requests to your new environment pretty quickly.