more nines for your dimes: improving availability and lowering costs using auto scaling and amazon...

44
© 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified, or distributed in whole or in part without the express consent of Amazon.com, Inc. More Nines for Your Dimes: Improving Availability and Lowering Costs using Auto Scaling Ran Tessler, AWS Solutions Architecture ([email protected]) September 17, 2014

Upload: amazon-web-services

Post on 02-Nov-2014

531 views

Category:

Technology


0 download

DESCRIPTION

Running your Amazon EC2 instances in Auto Scaling groups allows you to improve your application's availability right out of the box. Auto Scaling replaces impaired or unhealthy instances automatically to maintain your desired number of instances (even if that number is one). You can also use Auto Scaling to automate the provisioning of new instances and software configurations as well as to track of usage and costs by app, project, or cost center. Of course, you can also use Auto Scaling to adjust capacity as needed - on demand, on a schedule, or dynamically based on demand. In this session, we show you a few of the tools you can use to enable Auto Scaling for the applications you run on Amazon EC2.

TRANSCRIPT

Page 1: More nines for your dimes: Improving availability and lowering costs using auto scaling and amazon ec2

© 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified, or distributed in whole or in part without the express consent of Amazon.com, Inc.

More Nines for Your Dimes: Improving Availability and Lowering Costs using Auto Scaling

Ran Tessler, AWS Solutions Architecture ([email protected])

September 17, 2014

Page 2: More nines for your dimes: Improving availability and lowering costs using auto scaling and amazon ec2

Topics We’ll Cover Today• Auto Scaling introduction• Console demo

• Maintaining application response times and fleet utilization• Handling cyclical demand, unexpected “weather events”

• Auto Scaling for 99.9% Uptime• Single-instance groups

• The opportunity cost of NOT scaling• Auto Scaling to reduce costs

AWS

The Weather Channel

Nokia

Dreambox

Page 3: More nines for your dimes: Improving availability and lowering costs using auto scaling and amazon ec2

Ways You Can Use Auto Scaling

Launch EC2 instances

and groups from

reusable templates

Scale up and down as

needed automatically

Auto-replace

Instances and

maintain EC2 capacity

Launch Configurations Auto Scaling Groups Auto Scaling Policies

Page 4: More nines for your dimes: Improving availability and lowering costs using auto scaling and amazon ec2

Demo

Learn the new terms:

Launch Configuration

Auto Scaling Group

Scaling Policy

Amazon CloudWatch Alarm

Amazon SNS Notification

Page 5: More nines for your dimes: Improving availability and lowering costs using auto scaling and amazon ec2

What’s New in Auto Scaling

Better integration

• EC2 console support

• Scheduled scaling policies in

CloudFormation templates

• ELB connection draining

• Auto-assign public IPs in VPC

• Spot + Auto Scaling

More APIs

• Create groups based on running instances

• Create launch configurations based on running

instances

• Attach or detach running instances from a

group

• Perform lifecycle actions on group instances

• Place instances in standby state for

troubleshooting

Page 6: More nines for your dimes: Improving availability and lowering costs using auto scaling and amazon ec2

Why Auto Scaling?

Scale Up Control CostsImprove Availability

Page 7: More nines for your dimes: Improving availability and lowering costs using auto scaling and amazon ec2

Why Auto Scaling?

Scale Up Control CostsImprove Availability

Page 8: More nines for your dimes: Improving availability and lowering costs using auto scaling and amazon ec2

The Weather Company• Top 30 web property in the U.S.• 2nd most viewed television

channel in the U.S.• 85% of U.S. airlines depend on

our forecasts• Major retailers base marketing

spend and store displays based on our forecasts

• 163 million unique visitors across TV and web

Page 9: More nines for your dimes: Improving availability and lowering costs using auto scaling and amazon ec2

Wunderground Radar and Maps100 million hits a day One Billion data points per day

Migrated real-time radar mapping system wunderground.com to AWS Cloud

Page 10: More nines for your dimes: Improving availability and lowering costs using auto scaling and amazon ec2

30,000 PersonalWeatherStations

Source: Wunderground, Inc. 2013

Page 11: More nines for your dimes: Improving availability and lowering costs using auto scaling and amazon ec2

Why Auto Scaling?

Page 12: More nines for your dimes: Improving availability and lowering costs using auto scaling and amazon ec2

Why Auto Scaling?

Page 13: More nines for your dimes: Improving availability and lowering costs using auto scaling and amazon ec2

Why Auto Scaling?

Page 14: More nines for your dimes: Improving availability and lowering costs using auto scaling and amazon ec2

Why Auto Scaling?

Page 15: More nines for your dimes: Improving availability and lowering costs using auto scaling and amazon ec2

Why Auto Scaling?Hurricane Sandy

Page 16: More nines for your dimes: Improving availability and lowering costs using auto scaling and amazon ec2

Before Migration – Traditional IT Model doesn’t scale well

Server Count(110 Servers)

Avg. CPU Load HTTP Response Latency(~6000 ms)

HTTP Response Latency(5-15ms)

Server Count(from 110 to 170 Instances)

Avg. CPU Load

After Migration - Wunderground Radar App

Page 17: More nines for your dimes: Improving availability and lowering costs using auto scaling and amazon ec2

Radar on AWS Auto Scaling Architecture

Page 18: More nines for your dimes: Improving availability and lowering costs using auto scaling and amazon ec2

Radar on AWS

CPU Utilization

Page 19: More nines for your dimes: Improving availability and lowering costs using auto scaling and amazon ec2

Radar on AWS

Host Count

Page 20: More nines for your dimes: Improving availability and lowering costs using auto scaling and amazon ec2

Radar on AWS

Page 21: More nines for your dimes: Improving availability and lowering costs using auto scaling and amazon ec2

Radar on AWS

Page 22: More nines for your dimes: Improving availability and lowering costs using auto scaling and amazon ec2

Radar on AWS

Page 23: More nines for your dimes: Improving availability and lowering costs using auto scaling and amazon ec2

Scale up to ensure consistent performance during high-demand

Page 24: More nines for your dimes: Improving availability and lowering costs using auto scaling and amazon ec2

Why Auto Scaling?

Scale Up Control CostsImprove Availability

Page 25: More nines for your dimes: Improving availability and lowering costs using auto scaling and amazon ec2

Auto Scaling for 99.9% Uptime

Page 26: More nines for your dimes: Improving availability and lowering costs using auto scaling and amazon ec2

Here.com Local Search Application

• Local Search app• First customer facing

application on AWS• Obvious need for

Uptime

Page 27: More nines for your dimes: Improving availability and lowering costs using auto scaling and amazon ec2

Here.com Local Search Architecture

US-East-1

US-West-2

EU-West-1

US-East-1a

Zookeeper1

Zookeeper2

Zookeeper3

Frontend Group

BackendGroups

US-East-1b

Zookeeper1

Zookeeper2

Zookeeper3

Frontend Group

Backend Groups

AP-Southeast-1

Page 28: More nines for your dimes: Improving availability and lowering costs using auto scaling and amazon ec2

Here.com Local Search Architecture

US-East-1

US-West-2

EU-West-1

US-East-1a

Zookeeper1

Zookeeper2

Zookeeper3

Frontend Group

BackendGroups

US-East-1b

Zookeeper1

Zookeeper2

Zookeeper3

Frontend Group

Backend Groups

AP-Southeast-1

Single-Instance Auto Scaling Groups (Zookeeper)

1. Auto-healing: Instances auto-register in

DNS via Route53

2. Dynamic: Auto Scaling Group Names

are used for cluster-node lookups

(cluster1-zookeeper1)

3. Used Standard Tools such as DNS

instead of Queries or Elastic IPs

Page 29: More nines for your dimes: Improving availability and lowering costs using auto scaling and amazon ec2

Here.com Local Search Success

• Increased Uptime to 99.9%• All detected health

problems have been successfully replaced by Auto Scaling with zero intervention.

• Zookeeper setup has performed flawlessly

“We’ve been paranoid so it still pages us; It’s beginning to feel silly.”

Page 30: More nines for your dimes: Improving availability and lowering costs using auto scaling and amazon ec2

Why Auto Scaling?

Scale Up Control CostsImprove Availability

Page 31: More nines for your dimes: Improving availability and lowering costs using auto scaling and amazon ec2
Page 32: More nines for your dimes: Improving availability and lowering costs using auto scaling and amazon ec2

A little background on our application

• Ruby on Rails• Unicorn• We teach kids math!

Page 33: More nines for your dimes: Improving availability and lowering costs using auto scaling and amazon ec2

A workload well suited for auto scaling

Page 34: More nines for your dimes: Improving availability and lowering costs using auto scaling and amazon ec2

The opportunity cost of NOT scaling• Our usage curve

from 3/20• Low of about 5

concurrent users• High of about

10,000 concurrent users

Page 35: More nines for your dimes: Improving availability and lowering costs using auto scaling and amazon ec2

The opportunity cost of NOT scaling• No autoscaling• 672 instance hours• $302.40 at on-

demand prices

Page 36: More nines for your dimes: Improving availability and lowering costs using auto scaling and amazon ec2

The opportunity cost of NOT scaling• Autoscaling four

times per day• 360 instance hours• $162 at on-demand

prices• 46% savings vs no

autoscaling

Page 37: More nines for your dimes: Improving availability and lowering costs using auto scaling and amazon ec2

The opportunity cost of NOT scaling• Autoscaling as

needed, twelve times per day

• 272 instance hours• $122.40 at on-

demand prices• 24% savings vs

scaling 4 times per day

• 60% savings vs no autoscaling

Page 38: More nines for your dimes: Improving availability and lowering costs using auto scaling and amazon ec2

The opportunity cost of NOT scaling

$302/day

$162/day

$122/day

Page 39: More nines for your dimes: Improving availability and lowering costs using auto scaling and amazon ec2

Demand curve hugs the usage curve…

Page 40: More nines for your dimes: Improving availability and lowering costs using auto scaling and amazon ec2

“Auto Scaling saves us a lot of money; with a little bit of math, flexibility of AWS allows us to further save by aligning our demand curve with usage curve.” -- Dreambox

Page 41: More nines for your dimes: Improving availability and lowering costs using auto scaling and amazon ec2

Why Auto Scaling?

Scale Up Control CostsImprove Availability

Page 42: More nines for your dimes: Improving availability and lowering costs using auto scaling and amazon ec2

Key Takeaways

• Maintaining application response times and fleet utilization• Scaling up and handling unexpected “weather events”

• Auto Scaling for 99.9% Uptime• Single-instance groups

• The opportunity cost of NOT scaling• Auto Scaling to reduce costs

The Weather Channel

Nokia

Dreambox

Page 43: More nines for your dimes: Improving availability and lowering costs using auto scaling and amazon ec2

Common Scenarios

• Schedule a one-time scale out and flip to production

• Follow daily, weekly, or monthly cycles

• Provision capacity dynamically by scaling on CPU, memory,

request rate, queue depth, users, etc.

• Auto-tag instances with cost center, project, version, stage

• Auto-replace instances that fail ELB or EC2 checks

• Auto-balance instances across multiple zones.

Prepare for a Big Launch

Fit Capacity to Demand

Be Ready for Spikes

Simplify Cost Allocation

Maintain Stable Capacity

Go Multi-AZ

Page 44: More nines for your dimes: Improving availability and lowering costs using auto scaling and amazon ec2

Thank You!

Ran [email protected]