17.08.2017 Views

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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

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

Read additi<strong>on</strong>al recommendati<strong>on</strong>s for achieving zero downtime with Elastic<br />

Beanstalk during your applicati<strong>on</strong> upgrade. 48 Similarly, review the<br />

recommendati<strong>on</strong> for updating AWS CloudFormati<strong>on</strong> stacks while preventing<br />

updates to stack resources. 49 In additi<strong>on</strong>, c<strong>on</strong>sider m<strong>on</strong>itoring your instances in<br />

the blue <str<strong>on</strong>g>deployment</str<strong>on</strong>g> and ELB’s c<strong>on</strong>necti<strong>on</strong> draining before terminating<br />

instances. 50<br />

If you use Amaz<strong>on</strong> Route53 to host your DNS records, you can c<strong>on</strong>sider using the<br />

Weighted Round Robin (WRR) feature for migrating from blue to green<br />

<str<strong>on</strong>g>deployment</str<strong>on</strong>g>s. The feature helps to drive the traffic gradually rather than<br />

instantly. 51 If your applicati<strong>on</strong> has a bug, this method helps ensure the blast<br />

radius is minimal as it <strong>on</strong>ly affects small number <str<strong>on</strong>g>of</str<strong>on</strong>g> users. This method also<br />

simplifies rollbacks if they become necessary. In additi<strong>on</strong>, you <strong>on</strong>ly use the<br />

required number <str<strong>on</strong>g>of</str<strong>on</strong>g> instances while you scale up in the green and scale down in<br />

the blue <str<strong>on</strong>g>deployment</str<strong>on</strong>g>. For example, you can set WRR to allow 10% <str<strong>on</strong>g>of</str<strong>on</strong>g> the traffic to<br />

go to green <str<strong>on</strong>g>deployment</str<strong>on</strong>g> while keeping 90% <str<strong>on</strong>g>of</str<strong>on</strong>g> traffic <strong>on</strong> blue. You gradually<br />

increase the percentage <str<strong>on</strong>g>of</str<strong>on</strong>g> green instances until you achieve a full cutover.<br />

Keeping the DNS cache to a shorter TTL <strong>on</strong> the client side also ensures the client<br />

will c<strong>on</strong>nect to green <str<strong>on</strong>g>deployment</str<strong>on</strong>g> with rapid release cycle thus minimizing bad<br />

DNS caching behavior.<br />

Hybrid Deployment Model Approach<br />

You can also use the <str<strong>on</strong>g>deployment</str<strong>on</strong>g> services in a hybrid fashi<strong>on</strong> for managing your<br />

applicati<strong>on</strong> fleet. For example, you can combine the simplicity <str<strong>on</strong>g>of</str<strong>on</strong>g> managing AWS<br />

infrastructure provided by Elastic Beanstalk and the automati<strong>on</strong> <str<strong>on</strong>g>of</str<strong>on</strong>g> custom<br />

network segmentati<strong>on</strong> provided by AWS CloudFormati<strong>on</strong>. Leveraging a hybrid<br />

<str<strong>on</strong>g>deployment</str<strong>on</strong>g> model also simplifies your architecture as it decouples your<br />

<str<strong>on</strong>g>deployment</str<strong>on</strong>g> method so that you can choose different strategies for updating your<br />

applicati<strong>on</strong> stack.<br />

A few example scenarios are provided below. These are not exhaustive; they are<br />

meant to give you an idea <str<strong>on</strong>g>of</str<strong>on</strong>g> hybrid <str<strong>on</strong>g>deployment</str<strong>on</strong>g> approaches that you can plan for.<br />

Scenario 1: Use AWS CloudFormati<strong>on</strong> to deploy an Elastic Beanstalk applicati<strong>on</strong><br />

al<strong>on</strong>g with an AWS service integrati<strong>on</strong> such as DynamoDB, Amaz<strong>on</strong> RDS, and<br />

Amaz<strong>on</strong> S3.<br />

Page 17 <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!