Top Banner
AWS : COSTS OPTIMIZATION WHILE42, PALO ALTO #0
29

AWS costs optimization

Aug 23, 2014

Download

Internet

My While42 (french engineer network) talk in Palo Alto #0 about "AWS costs optimization"
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: AWS costs optimization

A W S : C O S T S O P T I M I Z AT I O N

W H I L E 4 2 , PA L O A LT O # 0

Page 2: AWS costs optimization

• mobile service

• free texts / calls / video chats

• on AWS since 3 years

• up to 100 instances

• API & VoIP

• 500k+ connected devices

• focused on performance

Page 3: AWS costs optimization

H O W T O O P T I M I Z E Y O U R A W S C O S T S ?

Page 4: AWS costs optimization

J u s t w a i t …

• 42 price reductions since 2008

• each time from 7% to 66%

• on EC2, S3, traffic…

• new cost-saving features

Page 5: AWS costs optimization

U s e t h e b u i l t - i n A W S t o o l s

• Predict : AWS calculator

• Analyze : Cost Explorer / Usage Report

• Optimize : Trusted Advisor (business support)

Page 6: AWS costs optimization

E n a b l e C S V e x p o r t s

Page 7: AWS costs optimization

Ta g e v e r y t h i n g !

Page 8: AWS costs optimization

D e c l a r e t a g s i n y o u r c o s t s r e p o r t s

Page 9: AWS costs optimization

B u i l d y o u r o w n r e p o r t s

Page 10: AWS costs optimization

B u i l d y o u r o w n r e p o r t s

Page 11: AWS costs optimization

K N O W Y O U R T O O L S

Page 12: AWS costs optimization

N E W F E AT U R EA U G U S T 2 0 1 3 :

S3 requests :

Page 13: AWS costs optimization
Page 14: AWS costs optimization

The problem…

Page 15: AWS costs optimization

(boto issue #2078, fixed on Feb 7th 2014)

python-boto < 2.25.0

Page 16: AWS costs optimization

F i x d e p l o y e d o n S e p 1 1 t h 2 0 1 3

Page 17: AWS costs optimization

A M A Z O N S 3

Page 18: AWS costs optimization

A m a z o n S 3

• Storage class : STANDARD / REDUCED_REDUNDANCY

• Glacier for cold storage

• Lifecycle : transfer to Glacier, purge

Page 19: AWS costs optimization

A M A Z O N E C 2

Page 20: AWS costs optimization

B a s i c t i p s

• Use the right instance type / family

• Delete / terminate unused ressources

• Scale up or down :

• by schedule

• by policy

Page 21: AWS costs optimization

Our typical workload

Page 22: AWS costs optimization

A u t o s c a l i n g t o t h e r e s c u e !

• Automated boot

• From min to max instances

• Triggers to scale up / down

• Load-balacing

• Health checks

Page 23: AWS costs optimization

Efficience

(costs / 2)

Page 24: AWS costs optimization

B e y o n d o n d e m a n d i n s t a n c e s

• Reserved instances : upfront fee, then lower hourly cost

• light / medium / heavy

• 1-year or 3-years term

• now flexible with instance family / AZ

• Spot instances

• can be very cheap (10% of the on demand price!)

• not for every workload

• their price depends on the instance type AND the AZ

Page 25: AWS costs optimization

Example : Autoscaling + spot instances

Page 26: AWS costs optimization

A p p r o v e d b y M c G y v e r !

1. Configure your autoscaling with ondemand instances

2. Launch it

3. Re-configure your autoscaling to use spot instances

4. Change the termination policy to NewestInstance

5. Boom!

Page 27: AWS costs optimization

B e s a f e !

• monitor the spot instances’ prices, be pro-active

!

!

!

!

• Spread your autoscaling on many AZ

• Route53 (+ health checks) can provide a failover

Page 28: AWS costs optimization

Thank you!

Page 29: AWS costs optimization

j o b s @ g o - t e x t . m e !

@ t e x t m e a p p

W E ’ R E H I R I N G !