ec2 pricing model (deck 0307 of the infiniteskills aws course at
Post on 31-May-2015
229 Views
Preview:
DESCRIPTION
TRANSCRIPT
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
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
On Demand
• Highest cost• No up-front commitment
EC2
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
Reserved
…Think “Plan” EC2Plan Down Payment Hourly Cost
None $0 $1.00
Platinum $100 $0.30
Gold $60 $0.50
Silver $30 $0.80
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)
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)
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
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
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
What if I buy the wrong Reservation?
You can now sell (and buy) unused reservations
http://aws.amazon.com/ec2/reserved-instance/marketplaceEC2
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
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?!
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!
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
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
Spot Instances
• Historical prices available– From console (EC2 dashboard)– Programmatically (consume API via scripts)
EC2
Spot Instances
• Spot prices get bid up– For short periods of time– Mainly by scientific & financial institutions
EC2
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
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
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
Pricing Model for EC2
• 3 ways to pay– On Demand– Reservation– Spot
EC2
top related