Reputation: 617
When using Elastic Beanstalk with CNAME swapping for zero downtime deployments, DNS caching (clients not respecting TTL) causes some clients to continue sending traffic to the old environment (for up to several days).
When using Elastic Beanstalk with Route53 Aliases for zero downtime deployments, does DNS caching remain an issue?
Upvotes: 4
Views: 1909
Reputation: 1111
http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/using-features.CNAMESwap.html it says
you deploy the new version to a separate environment, and then swap CNAMEs of the two environments to redirect traffic to the new version instantly.
and
However, do not terminate your old environment until the DNS changes have been propagated and your old DNS records expire. DNS servers do not necessarily clear old records from their cache based on the time to live (TTL) you set on your DNS records.
isn't it conflict? I think DNS caching is still an issue.
How can I migrate the DB to a new version while older version clients exist. I guess I can migrate db only when it works for both two version.
I've found a good article here. http://fbrnc.net/blog/2016/05/green-blue-deployments-with-aws-lambda-and-cloudformation but it use Cloud Formation, not Elastic Beanstalk.
Upvotes: 1
Reputation: 95
I havent tested this yet but I thought this was why they implemented the "Swap Environment URLs" action, rather than doing it in route53.
Upvotes: 0
Reputation: 3609
Unfortunately it does. The recommended way now is to use rolling updates.
Upvotes: 0