0

I have an ASP.NET MVC application hosted on a stand alone EC2 instance. My Route53 hosted zone has a record to the Elastic IP of the EC2 instance.

I don't have an Elastic Load Balancer and I don't have a requirement for one.

Is it possible to deploy a new version of my website into AWS with minimal or no down time and without having to establish and pay for an Elastic Load Balancer?

2

The simplest way to perform switchover to your new application deployment (EC2 instance) could work like this:

  1. launch/configure another EC2 instance and deploy new version of application on it
  2. test new deployment
  3. when you are ready reassign the EIP from the old EC2 instance to the new one

This method will definitely introduce some minimal down time during reassignment of EIP address. This is not a real-time operation.

You can also perform classic DNS switchover (kind of blue/green deployment) to switch from old to new application deployment. You could have two weighted, e.g. CNAME, resource records in designated Route53 DNS zone pointing to your old and new deployment. When processing a DNS query, Route53 will select one answer using a probability calculated based on those weights. To perform the switchover you will initially have weight 100 for "old" record and 0 for "new" record. At the end, you will have just simply swap these weights. The only disadvantage of this approach is that propagating DNS changes can take some time, so you would have no control over when the user will perceive it. This is due to the fact that many clients just don't obey DNS TTL values, and will cache DNS for days, even though the record has TTL e.g. 60s.

  1. "old" weight = 100, "new" weight = 0 - only "old" is used old deployment only
  2. "old" weight = 75, "new" weight = 25 - start testing the "new" one test new
  3. "old" weight = 0, "new" weight = 100 - switch over to the "new" one switch over to new

BTW, there is a nice presentation regarding "Blue/Green deployments on AWS".

  • That's fantastic. Thank you for answering the question, I appreciate it a lot! – Luke Jan 14 '16 at 13:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.