I'm currently migrating my application from ECS to EKS and set up a new Application Load Balancer (ALB) for EKS, which is managed through Kubernetes. I need to redirect the old DNS records from the ECS ALB to the new EKS ALB. I'm trying to understand how 'auto TTL' functions when modifying the DNS records for the ALB. Specifically, how long will clients cache the DNS records when the TTL is set to auto?
5 Answers
To check your Route 53 record, look for the 4 authoritative hosts. You can use the command: `dig @your-dns-server.amazon.whatever.route53.com your-alb.your-domain.com A` to find the details.
I'm not entirely sure what issue you're facing. Have you considered running your app on both EKS and ECS for a while? Since you're using EKS, it seems like you could have multiple replicas running. Another option would be to create a target group in your old ALB with the new setup, adjusting the weights as needed. That way, the DNS record's TTL wouldn't affect your transition.
I assume the EKS ALB is being managed by the AWS LB Controller, which provisions it directly in the cluster. You could still reuse the old ALB, but transitioning to the new ALB could be worthwhile eventually.
From what I remember, the auto TTL is generally around 60 seconds, but I can't pinpoint the exact source for that.
If your current record is an ALIAS to the existing ALB, clients can cache it for up to 60 seconds after you change to the new ALB. But if it’s just a CNAME, then the TTL of that CNAME will apply. The vast majority of clients respect these DNS TTLs, but some, like certain Java-based clients, might cache forever during their runtime. To avoid this, consider sharing the existing ALB by setting up listener rules with different target groups. This way, you won't face the TTL issue, and you'll have a fully set-up ALB before switching, saving you a ton of time on configuration.

Related Questions
How to Build a Custom GPT Journalist That Posts Directly to WordPress
Cloudflare Origin SSL Certificate Setup Guide
How To Effectively Monetize A Site With Ads