ec2 pricing model (deck 0307 of the infiniteskills aws course at

22
Pricing Model for EC2 3 ways to pay On Demand – Reservation – Spot You get exact same instance in each case Pricing is just a billing construct In each case, capacity is not guaranteed (even for reservations) AWS has (rarely) run out of capacity in their data centers EC2

Upload: rich-morrow

Post on 31-May-2015

228 views

Category:

Engineering


1 download

DESCRIPTION

More clearly explains On Demand, Reserved, and Spot instances. Part of a much larger, 5+ hour course at http://bit.ly/learn-aws/ (this is deck 0307 of the course). NOTE: Some info is outdated in here.

TRANSCRIPT

Page 1: EC2 Pricing Model (deck 0307 of the InfiniteSkills AWS course at

Pricing Model for EC2

• 3 ways to pay– On Demand– Reservation– Spot

• You get exact same instance in each case• Pricing is just a billing construct• In each case, capacity is not guaranteed (even for

reservations)– AWS has (rarely) run out of capacity in their data centers

EC2

Page 2: EC2 Pricing Model (deck 0307 of the InfiniteSkills AWS course at

Pricing Model makes HUGE difference

• 70%+ of your AWS bill will be EC2• Leveraging different models, you can pay 70%

+ less for the exact same instance

EC2

Page 3: EC2 Pricing Model (deck 0307 of the InfiniteSkills AWS course at

On Demand

• Highest cost• No up-front commitment

EC2

Page 4: EC2 Pricing Model (deck 0307 of the InfiniteSkills AWS course at

Reserved

• Pay up-front “reservation” fee• In exchange for lower hourly fee• (Possibly) lowest cost for dedicated instance

(spot can be taken away)• 1 and 3 year terms available• Restrictive. Reservation must include:

– AZ– Instance type– Platform– Term (1 or 3 years)

EC2

Page 5: EC2 Pricing Model (deck 0307 of the InfiniteSkills AWS course at

Reserved

…Think “Plan” EC2Plan Down Payment Hourly Cost

None $0 $1.00

Platinum $100 $0.30

Gold $60 $0.50

Silver $30 $0.80

Page 6: EC2 Pricing Model (deck 0307 of the InfiniteSkills AWS course at

Reserved

Billing 1st Payment Hourly Cost

On Demand $0 $1.00

High Usage $100 $0.30

Medium Usage $60 $0.50

Low Usage $30 $0.80

EC2

Name has NOTHIN

G

to do with

actual u

sage!

…exc

ept

High Usage is charged as always on! 24x7x365

…Now Reality (almost)

Page 7: EC2 Pricing Model (deck 0307 of the InfiniteSkills AWS course at

Reserved

Billing Term 1st Payment Hourly Cost

On Demand N/A $0 $1.00

High Usage 3yr $100 $0.30

High Usage 1yr $90 $0.35

Medium Usage 3yr $60 $0.50

Medium Usage 1yr $50 $0.60

Low Usage 3yr $30 $0.80

Low Usage 1yr $20 $0.90

…Full reality (complicated as ever)

Page 8: EC2 Pricing Model (deck 0307 of the InfiniteSkills AWS course at

On Demand + Reserved

• Mixing gives good balance of– Cost savings– Flexibility

EC2

1 4 7 10 13 16 19 220

50

100

150

200

Load

Load

# S

erve

rs

RESERVED

ON DEMAND

Page 9: EC2 Pricing Model (deck 0307 of the InfiniteSkills AWS course at

How do I apply Reservations?

• You don’t, AWS does• If you have a reservation for an instance of:

– Specific Type, AZ, OS– AWS applies the reservation billing automatically– You always are charged lowest rate possible– (or are you)?

EC2

Page 10: EC2 Pricing Model (deck 0307 of the InfiniteSkills AWS course at

On Demand cheaper than Reserved?

• AWS continues to cut pricing– 21 times in last 4 years

• Some customers observed that over 3 years, On Demand could be cheaper!

• Past Performance != Future

EC2

Page 11: EC2 Pricing Model (deck 0307 of the InfiniteSkills AWS course at

What if I buy the wrong Reservation?

You can now sell (and buy) unused reservations

http://aws.amazon.com/ec2/reserved-instance/marketplaceEC2

Page 12: EC2 Pricing Model (deck 0307 of the InfiniteSkills AWS course at

Spot Instances

• On Demand & Reserved are “stable”– AWS cannot shut your servers down

• Not so with spot!• Spot instances:

– You bid for unused capacity in a data center– If your bid is filled, you get the instance– If spot price goes above your bid, you lose that instance– …without warning– AWS determines the spot price

EC2

Page 13: EC2 Pricing Model (deck 0307 of the InfiniteSkills AWS course at

Spot Instances

• On Demand & Reserved are “stable”– AWS cannot shut your servers down

• Not so with spot!• Spot instances:

– You bid for unused capacity in a data center– If your bid is filled, you get the instance– If spot price goes above your bid, you lose that instance– …without warning– AWS determines the spot price

EC2

Why would anyoneever want to use spot?!

Page 14: EC2 Pricing Model (deck 0307 of the InfiniteSkills AWS course at

Spot Use Cases

EC2• Batch jobs• Offline processing• Big Data analysis

– EMR (Hadoop in AWS can use spot for worker nodes)

• Throw-away environments– Testing, development

• Buffering user-facing web traffic– Very advanced use case!

Page 15: EC2 Pricing Model (deck 0307 of the InfiniteSkills AWS course at

On Demand + Reserved + Spot

• Spot serves peak EC2

1 4 7 10 13 16 19 220

50

100

150

200

Load

Load

# S

erve

rs

RESERVED

ON DEMAND

SPOT

Page 16: EC2 Pricing Model (deck 0307 of the InfiniteSkills AWS course at

Spot Best Practices

EC2• Break work into smallest pieces possible• Return useful results ASAP

– Minimize data copy in & out (like SETI@Home)

• If using to “serve peak”:– Set bid price high– Fail over to On Demand if bid not fulfilled

Page 17: EC2 Pricing Model (deck 0307 of the InfiniteSkills AWS course at

Spot Instances

• Historical prices available– From console (EC2 dashboard)– Programmatically (consume API via scripts)

EC2

Page 18: EC2 Pricing Model (deck 0307 of the InfiniteSkills AWS course at

Spot Instances

• Spot prices get bid up– For short periods of time– Mainly by scientific & financial institutions

EC2

Page 19: EC2 Pricing Model (deck 0307 of the InfiniteSkills AWS course at

Use Case: On Demand

• New to AWS– Not yet sure which AZ and instance type you’ll use long-term– Not sure if you’ll stay with AWS

• New products (daily usage curve unknown)• Buffering known curves (Reserved serves most)• Prototyping• You feel EC2 price trend line will continue

EC2

Page 20: EC2 Pricing Model (deck 0307 of the InfiniteSkills AWS course at

Use Case: Reserved

• Established with AWS– You know exactly which AZ and instance type you’ll use long-term

• Established products (daily usage curve known)• Buffering known curves (Reserved serves base)

EC2

Page 21: EC2 Pricing Model (deck 0307 of the InfiniteSkills AWS course at

Choose Pricing Wisely

• Start slow with On Demand• Add in reservations as it makes sense• Investigate ways to use Spot• Keep watching AWS pricing• Keep re-calculating “cheapest” option

EC2

Page 22: EC2 Pricing Model (deck 0307 of the InfiniteSkills AWS course at

Pricing Model for EC2

• 3 ways to pay– On Demand– Reservation– Spot

EC2