- Newest
- Most votes
- Most comments
As a best practice, we recommend our customers to refresh the DNS resolver cache every 60 seconds or less. This is applicable for the new connections when the public IP is changing for the Classic Load Balancers.
Elastic Load Balancers automatically scale to appropriate size based on traffic. When scaling, nodes in your load balancer may be replaced or additional nodes may be added. Replaced nodes will be removed from your load balancer DNS record while remaining active until traffic is drained from them. A node that has been removed from service will first be removed from DNS so that new traffic will not be sent to it. Then it will enter a grace period waiting for traffic to drain, and existing requests to be completed, after which it will be shutdown.
With that being said, if end-user has hardcoded the CLB IP or has larger TTL and attempts to connect to a node which was removed recently would end up getting time out error. Thus, as previously mentioned it recommended to use ELB DNS name and have maximum of 60 seconds DNS cache (TTL) value.
Additionally, for needing static IP’s you can also consider of using Network Load balancer where a static IP per Availability Zone (subnet) is assigned that can be used by applications as the front-end IP of the load balancer ( Flow example: Client -> NLB -> Target). These static IP addresses will not change during the lifetime of the load balancer [2]. Therefore, the client can technically using those IPs directly i.e. hardcode or can cache it for longer period of time.
References: [1] https://docs.aws.amazon.com/elasticloadbalancing/latest/userguide/how-elastic-load-balancing-works.html. [2] https://aws.amazon.com/elasticloadbalancing/network-load-balancer/
Relevant content
- asked 2 years ago
- asked 4 years ago
- asked 2 years ago

Does it mean that the existing TCP connections to the LB whichever was via old IP address would be drained with max drain time of certain time interval (like idle timeout)? Also would this be a hard cutover for new TCP connections after the DNS entry is updated (or) would the old address continue to serve new TCP connections for 60 seconds alone?