AWS : COSTS OPTIMIZATION WHILE42, PALO ALTO #0
Aug 23, 2014
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
• mobile service
• free texts / calls / video chats
• on AWS since 3 years
• up to 100 instances
• API & VoIP
• 500k+ connected devices
• focused on performance
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 ?
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
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)
E n a b l e C S V e x p o r t s
Ta g e v e r y t h i n g !
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
B u i l d y o u r o w n r e p o r t s
B u i l d y o u r o w n r e p o r t s
K N O W Y O U R T O O L S
N E W F E AT U R EA U G U S T 2 0 1 3 :
S3 requests :
The problem…
(boto issue #2078, fixed on Feb 7th 2014)
python-boto < 2.25.0
F i x d e p l o y e d o n S e p 1 1 t h 2 0 1 3
A M A Z O N S 3
A m a z o n S 3
• Storage class : STANDARD / REDUCED_REDUNDANCY
• Glacier for cold storage
• Lifecycle : transfer to Glacier, purge
A M A Z O N E C 2
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
Our typical workload
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
Efficience
(costs / 2)
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
Example : Autoscaling + spot instances
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!
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
Thank you!
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 !