Spot instance Strategies - AWS techies

13
Let’s discuss Spot Instances Spot Strategies

description

 

Transcript of Spot instance Strategies - AWS techies

Page 1: Spot instance Strategies - AWS techies

Let’s discuss Spot Instances

Spot Strategies

Page 2: Spot instance Strategies - AWS techies

WHO AM I?

Aater Suleman

Part-time UT Professor Geek, Architect, Developer, Ops, DevOps …

Co-founder & CEO Flux7 Labs

○ DevOps Solutions

■ Deployments■ Cost/performance optimized large scale website (Ruby on rails, node.js, Django)

and Hadoop deployments

Page 3: Spot instance Strategies - AWS techies

Spot Instances

Consumer chooses a maximum bid

AWS charges market price @ start of the hour

Can get terminated at any time

Page 4: Spot instance Strategies - AWS techies

Spot Strategy Checklist

Spot terminations

Spot outages

Launch failures

Optimized price = min(spot price, on-demand price)

Ability to auto-scale

Page 5: Spot instance Strategies - AWS techies

Similarities with Auto-scaling

Stateless instances

Apps can tolerate momentary dip in capacity

Apps can tolerate instance “swapping”

Launch failures

Page 6: Spot instance Strategies - AWS techies

Differences from auto-scaling?

No programmable cooldown period

Page 7: Spot instance Strategies - AWS techies

AppNeta’s (http://www.appneta.com/blog/aws-spot-instances/)

Two ASGs (spot and main)

SNS notifications on Spot ASGs

Outside daemon:

○ Spot instance termination ⇒ on-demand instance

Page 8: Spot instance Strategies - AWS techies

Analysis

Spot terminations

Spot outages

Launch failures

Optimized price

Ability to auto-scale

Page 9: Spot instance Strategies - AWS techies

Sanket’s Algorithm

Two ASGs (spot and on-demand)● Setup thresholds as follows:

ASG: On-demand

Scale up: CPU > 75%

Scale down: CPU < 55%

ASG: Spot

Scale up: CPU > 60%

Scale down: CPU < 45%

Page 10: Spot instance Strategies - AWS techies

Analysis

Spot terminations

Spot outages

Launch failures

Optimized price

Ability to auto-scale

Page 11: Spot instance Strategies - AWS techies

Flux7 v1.0

Our own auto-scaling solution that allows hybrid spot and on-demand

Step Up: If spot price < on-demand, launch spot

Spot Launch failure: Launch on-demand

Step Down: If on-demand is available, terminate it

End of hour: Treat like Step Up

Page 12: Spot instance Strategies - AWS techies

Analysis

Spot terminations

Spot outages

Launch failures

Optimized price

Ability to auto-scale (in-house ASG)

Page 13: Spot instance Strategies - AWS techies

Thank You