17.08.2017 Views

overview-of-deployment-options-on-aws (1)

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Amaz<strong>on</strong> Web Services – Deployment Opti<strong>on</strong>s <strong>on</strong> AWS March 2015<br />

Disposable Upgrade Method<br />

You can perform disposable upgrades in a couple <str<strong>on</strong>g>of</str<strong>on</strong>g> ways. You can use an Auto<br />

Scaling policy to define how you want to add (scale out) or remove (scale in)<br />

instances. 43 By coupling this with your update strategy, you can c<strong>on</strong>trol rolling<br />

out <str<strong>on</strong>g>of</str<strong>on</strong>g> an applicati<strong>on</strong> update as part <str<strong>on</strong>g>of</str<strong>on</strong>g> the scaling event.<br />

For example, you can update Auto Scaling to use the new AMI and c<strong>on</strong>figure a<br />

terminati<strong>on</strong> policy to use OldestInstance during a scale in event. Or you could use<br />

OldestLaunchC<strong>on</strong>figurati<strong>on</strong> to phase out all instances that use the previous<br />

c<strong>on</strong>figurati<strong>on</strong>. If you are using an Elastic Load Balancing (ELB), you can attach<br />

an additi<strong>on</strong>al Auto Scaling c<strong>on</strong>figurati<strong>on</strong> behind the ELB and use a similar<br />

approach to phase in newer instances while removing older instances.<br />

Similarly, you can c<strong>on</strong>figure rolling <str<strong>on</strong>g>deployment</str<strong>on</strong>g>s in c<strong>on</strong>juncti<strong>on</strong> with <str<strong>on</strong>g>deployment</str<strong>on</strong>g><br />

services such as AWS Elastic Beanstalk 44 and AWS CloudFormati<strong>on</strong>. 45 You can<br />

use update policies to describe how instances in an Auto Scaling group are<br />

replaced or modified as part <str<strong>on</strong>g>of</str<strong>on</strong>g> your update strategy. You can c<strong>on</strong>trol the number<br />

<str<strong>on</strong>g>of</str<strong>on</strong>g> instances to get updated c<strong>on</strong>currently or in batches. You can choose to apply<br />

the updates to certain instances while isolating in-service instances. You can also<br />

specify the time to wait between batched updates. In additi<strong>on</strong>, you can cancel or<br />

roll back an update if you discover a bug in your applicati<strong>on</strong> code. These features<br />

can help increase the availability <str<strong>on</strong>g>of</str<strong>on</strong>g> your applicati<strong>on</strong> during updates. See the next<br />

secti<strong>on</strong> <strong>on</strong> blue-green <str<strong>on</strong>g>deployment</str<strong>on</strong>g>s to address some c<strong>on</strong>cerns related to<br />

managing updates for sessi<strong>on</strong>ful applicati<strong>on</strong>s using Auto Scaling.<br />

Blue-Green Method<br />

Blue-green is a method in which you have two identical stacks <str<strong>on</strong>g>of</str<strong>on</strong>g> your applicati<strong>on</strong><br />

running in their own envir<strong>on</strong>ments. You use various strategies to migrate the<br />

traffic from your current applicati<strong>on</strong> stack (blue) to a new versi<strong>on</strong> <str<strong>on</strong>g>of</str<strong>on</strong>g> the<br />

applicati<strong>on</strong> (green). This is a popular technique for deploying applicati<strong>on</strong>s with<br />

zero downtime. The <str<strong>on</strong>g>deployment</str<strong>on</strong>g> services like AWS Elastic Beanstalk, AWS<br />

CloudFormati<strong>on</strong>, or AWS OpsWorks are particularly useful as they provide a<br />

simple way to cl<strong>on</strong>e your running applicati<strong>on</strong> stack. You can set up a new versi<strong>on</strong><br />

<str<strong>on</strong>g>of</str<strong>on</strong>g> your applicati<strong>on</strong> (green) by simply cl<strong>on</strong>ing current versi<strong>on</strong> <str<strong>on</strong>g>of</str<strong>on</strong>g> the applicati<strong>on</strong><br />

(blue).<br />

Page 15 <str<strong>on</strong>g>of</str<strong>on</strong>g> 23

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!