Reputation: 1
currently i am trying to implement green/blue deployment using AWS Route 53. There are simple web, rest applications which are run on custom EC2 instances, all behind Load Balancer. Web and rest are deployed are on same domain DNS.
I would like to use Traffic Policy with weights (to have green blue deploys), as endpoint use different application Load Balancers (for green, blue).
I wonder, is every request for same user always forwarded to the same Load Balancer? I don't want to end with situation where user gets webapp in old version and Api call is forwarded to new version.
Upvotes: 0
Views: 1916
Reputation: 81376
You can use Route 53 for blue / green deployments, but this is not a good solution. The reason is DNS caching and TTL. It takes time for DNS clients to make a new DNS query. This means that it can take an unpredictable amount of time to change the route of traffic.
Route 53 knows nothing of clients. Route 53 does not look into the HTTP headers to evaluate session variables, client cookies, etc. However, because of DNS caching it is likely (not guaranteed) that a client will continue to use the same resolved endpoint for a period of time. What is that period of time? Unknown as it requires knowledge of the DNS resolver on the client, how long the client waits to re-resolve a DNS entry and the TTL value assigned to the Route 53 resource record.
Your question: "I wonder, is every request for same user always forwarded to the same Load Balancer?"
The answer is no, maybe, and sometimes but not in a manner that is predictable or repeatable.
Upvotes: 2