What is the TTL for A Records with an Application Load Balancer?
Asked by
CloudySky77
I'm currently migrating my application from ECS to EKS and I've set up a new Application Load Balancer (ALB) for EKS managed by Kubernetes. Now, I need to redirect my old DNS records from the ECS ALB to the new EKS ALB. I'm trying to understand how the 'auto' TTL setting works for DNS records associated with an ALB. Specifically, how long do clients typically cache these DNS records when the TTL is set to auto?
Answers
I'm a bit confused about the issue you're facing. Is it not possible to run your application on both EKS and ECS simultaneously? Given you're using EKS, I would assume your app can handle multiple replicas. You could even set up a target group in the old ALB with new members and balance weights. That way, the TTL for the DNS record might not even matter in that scenario.
Reply to this answer
You can check your Route 53 record by looking for the authoritative hosts. Running a command like 'dig @your-dns-server.amazon.whatever.route53.com your-alb.your-domain.com A' should help you find the information you need.
Reply to this answer
I've heard it's typically around 60 seconds for DNS caching, but I'm not entirely sure. It's always good to double-check as policies can vary.
Reply to this answer
I think the ALB for your EKS is managed by the AWS LB Controller, which provisions directly in your cluster. While reusing the old ALB is an option, moving to the new one might be the better long-term solution.
Reply to this answer
If your current DNS record is an ALIAS to the existing ALB, clients can cache it for up to 60 seconds when you change to the new ALB. But if it's a CNAME, then it will depend on the TTL of the existing CNAME. Most clients respect these TTLs, but some may have their own caching rules. To prevent issues, consider reusing the old ALB with different target groups and listener rules. This allows for a seamless transition without worrying about TTLs, and you can manage how connections drain.
Reply to this answer
Add your answer
Answers are reviewed before publication.
Related Discussions