Autoscaling Best Practices
FOSDEM’14

Marc Cluet

DevOps & Automation Advisory
Rackspace

http://www.flickr.com/photos/goz...
Who am I?!
Marc Cluet (@lynxman)
More than 16 years of experience as a
SysAdmin
Founding member of Juju and MAAS
while at ...
What is Rackspace?!
Founded in 1998 in San Antonio, TX by
three guys that wanted to create a hosting
company
Home of Fanat...
What is Autoscaling?!

RACKSPACE® HOSTING

|

WWW.RACKSPACE.CO.UK
What is Autoscaling?!

WASTED!

$$$!

RACKSPACE® HOSTING

|

WWW.RACKSPACE.CO.UK
What is Autoscaling?!

RACKSPACE® HOSTING

|

WWW.RACKSPACE.CO.UK
What is Autoscaling?!
The ability to automatically or semiautomatically scale up and down a
group of servers based on
comp...
RACKSPACE® HOSTING | WWW.RACKSPACE.CO.UK
http://www.flickr.com/photos/fischerfotos/7419253200/
Traffic Patterns!

RACKSPACE® HOSTING

|

WWW.RACKSPACE.CO.UK
Traffic Patterns!
ON & OFF!
Analytics!
Banks/Tax Agencies!
Test environments!

RACKSPACE® HOSTING

|

WWW.RACKSPACE.CO.UK
Traffic Patterns!
FAST GROWTH!
Events!
Business Growth!
Slashdot Effect!

RACKSPACE® HOSTING

|

WWW.RACKSPACE.CO.UK
Traffic Patterns!
VARIABLE!
News & Media!
Event Registrations!
Rapid fire sales!

RACKSPACE® HOSTING

|

WWW.RACKSPACE.CO.UK
Traffic Patterns!
CONSISTENT!
HR Application!
Accounting/Finance!
E-mail!

RACKSPACE® HOSTING

|

WWW.RACKSPACE.CO.UK
RACKSPACE® HOSTING | WWW.RACKSPACE.CO.UK
http://www.flickr.com/photos/maximalideal/3356408693/
Autoscaling Methodologies!
Time Based!
Reactive!
Predictive!

RACKSPACE® HOSTING

|

WWW.RACKSPACE.CO.UK
Time Based Autoscaling!
Load
Balancer

Server

Server

RACKSPACE® HOSTING

|

WWW.RACKSPACE.CO.UK
Time Based Autoscaling!
Load
Balancer

9:00am!
Server

Server

RACKSPACE® HOSTING

|

WWW.RACKSPACE.CO.UK
Time Based Autoscaling!
Load
Balancer

Nov 1st!
Server

Server

RACKSPACE® HOSTING

|

WWW.RACKSPACE.CO.UK
Time Based Autoscaling!
Load
Balancer

Server

Server

Server

RACKSPACE® HOSTING

|

WWW.RACKSPACE.CO.UK
Time Based Autoscaling!
GOOD FOR!
On & Off!
Consistent!

RACKSPACE® HOSTING

|

WWW.RACKSPACE.CO.UK
Reactive Autoscaling!
Load
Balancer

Server
60%

Server
60%

RACKSPACE® HOSTING

|

WWW.RACKSPACE.CO.UK
Reactive Autoscaling!
Load
Balancer

Server
80%

Server
80%

RACKSPACE® HOSTING

|

WWW.RACKSPACE.CO.UK
Reactive Autoscaling!
Load
Balancer

Server
60%

Server
60%

Server
40%

RACKSPACE® HOSTING

|

WWW.RACKSPACE.CO.UK
Reactive Autoscaling!
Load
Balancer

Server
30%

Server
30%

Server
30%

RACKSPACE® HOSTING

|

WWW.RACKSPACE.CO.UK
Reactive Autoscaling!
Load
Balancer

Server
45%

Server
45%

RACKSPACE® HOSTING

|

WWW.RACKSPACE.CO.UK
Reactive Autoscaling!
GOOD FOR!
Fast Growth!
Variable!

RACKSPACE® HOSTING

|

WWW.RACKSPACE.CO.UK
Predictive Autoscaling!
Load
Balancer

Server

Server

RACKSPACE® HOSTING

|

WWW.RACKSPACE.CO.UK
Predictive Autoscaling!
Load
Balancer

Forecasted!
Traffic!

Server

Server

+30%!

RACKSPACE® HOSTING

|

WWW.RACKSPACE.CO...
Predictive Autoscaling!
Load
Balancer

Server

Server

Server

RACKSPACE® HOSTING

|

WWW.RACKSPACE.CO.UK
Predictive Autoscaling!
GOOD FOR!
Fast Growth!
Variable!

RACKSPACE® HOSTING

|

WWW.RACKSPACE.CO.UK
RACKSPACE® HOSTING | WWW.RACKSPACE.CO.UK
http://www.flickr.com/photos/samuraislice/3309481048/
Autoscaling Tools!

RACKSPACE® HOSTING

|

WWW.RACKSPACE.CO.UK
Autoscaling Tools!
Amazon Cloudformation!
Based on Scaling Groups!
High/Low Watermark!
Scheduled Events!
Uses base image +...
Autoscaling Tools!
Rackspace Autoscale!
Based on Scaling Groups!
High/Low Watermark!
Scheduled Events!
Uses Gold Image!

R...
Autoscaling Tools!
Rightscale Autoscale!
Based on Scaling Groups!
High/Low Watermark Quorum!
Scheduled Events!
Uses Rights...
Autoscaling Tools!
Heat!
Based on Templates!
High/Low Watermark!
Scheduled Events!
Uses Heat Scripts!
DSL Compatible with ...
Autoscaling Tools!
Scryer!
Based on AI!
Predictive Fidelity model!
Feeds AWS API!

RACKSPACE® HOSTING

|

WWW.RACKSPACE.CO...
Autoscaling Tools!
Your own!!
Collect your metrics!
!collectd, diamond, statsd!
Have a good metrics database!
!whisper, rr...
Autoscaling Tools!
Your own!!
Write your own autoscaling code!
!with message queues! :)!
!attached to your code!
!brain cl...
RACKSPACE® HOSTING | WWW.RACKSPACE.CO.UK
http://www.flickr.com/photos/68751915@N05/6355318323/
Taking the most of it!
Beware of the Kraken!!
Autoscaling can be dangerous!
Have min-max allocations!

http://www.flickr.c...
Taking the most of it!
Choose the right metrics!
Stay with basic metrics!
!CPU, mem, I/O disk/net!
Review autoscaling stra...
Taking the most of it!
Choose your strategy!
Scale up early!
Scale down slowly!
Don’t apply the same strategy to all
apps!...
Taking the most of it!
Phasing in and Phasing Out!
Have in mind time to availability!
Have in mind also decommission time!...
@lynxman!
http://slideshare.net/lynxmanuk/!
http://www.rackspace.co.uk/technicalservices/ !
!

RACKSPACE® HOSTING
|
UK SAL...
Upcoming SlideShare
Loading in...5
×

Autoscaling Best Practices

4,235

Published on

Talk presented at FOSDEM'14 about Autoscaling, general guidance of what autoscaling is and good practices and behaviours

Published in: Technology, Business

Autoscaling Best Practices

  1. 1. Autoscaling Best Practices FOSDEM’14 Marc Cluet DevOps & Automation Advisory Rackspace http://www.flickr.com/photos/gozalewis/3422530465/
  2. 2. Who am I?! Marc Cluet (@lynxman) More than 16 years of experience as a SysAdmin Founding member of Juju and MAAS while at Canonical Leading a DevOps Engineering Team at Rackspace Likes DevOps, programming and long walks on the beach RACKSPACE® HOSTING | WWW.RACKSPACE.CO.UK
  3. 3. What is Rackspace?! Founded in 1998 in San Antonio, TX by three guys that wanted to create a hosting company Home of Fanatical Support /o/ Second biggest Public Cloud in the world OpenStack Project co-founder RACKSPACE® HOSTING | WWW.RACKSPACE.CO.UK
  4. 4. What is Autoscaling?! RACKSPACE® HOSTING | WWW.RACKSPACE.CO.UK
  5. 5. What is Autoscaling?! WASTED! $$$! RACKSPACE® HOSTING | WWW.RACKSPACE.CO.UK
  6. 6. What is Autoscaling?! RACKSPACE® HOSTING | WWW.RACKSPACE.CO.UK
  7. 7. What is Autoscaling?! The ability to automatically or semiautomatically scale up and down a group of servers based on computing or traffic demand by provisioning new services! RACKSPACE® HOSTING | WWW.RACKSPACE.CO.UK
  8. 8. RACKSPACE® HOSTING | WWW.RACKSPACE.CO.UK http://www.flickr.com/photos/fischerfotos/7419253200/
  9. 9. Traffic Patterns! RACKSPACE® HOSTING | WWW.RACKSPACE.CO.UK
  10. 10. Traffic Patterns! ON & OFF! Analytics! Banks/Tax Agencies! Test environments! RACKSPACE® HOSTING | WWW.RACKSPACE.CO.UK
  11. 11. Traffic Patterns! FAST GROWTH! Events! Business Growth! Slashdot Effect! RACKSPACE® HOSTING | WWW.RACKSPACE.CO.UK
  12. 12. Traffic Patterns! VARIABLE! News & Media! Event Registrations! Rapid fire sales! RACKSPACE® HOSTING | WWW.RACKSPACE.CO.UK
  13. 13. Traffic Patterns! CONSISTENT! HR Application! Accounting/Finance! E-mail! RACKSPACE® HOSTING | WWW.RACKSPACE.CO.UK
  14. 14. RACKSPACE® HOSTING | WWW.RACKSPACE.CO.UK http://www.flickr.com/photos/maximalideal/3356408693/
  15. 15. Autoscaling Methodologies! Time Based! Reactive! Predictive! RACKSPACE® HOSTING | WWW.RACKSPACE.CO.UK
  16. 16. Time Based Autoscaling! Load Balancer Server Server RACKSPACE® HOSTING | WWW.RACKSPACE.CO.UK
  17. 17. Time Based Autoscaling! Load Balancer 9:00am! Server Server RACKSPACE® HOSTING | WWW.RACKSPACE.CO.UK
  18. 18. Time Based Autoscaling! Load Balancer Nov 1st! Server Server RACKSPACE® HOSTING | WWW.RACKSPACE.CO.UK
  19. 19. Time Based Autoscaling! Load Balancer Server Server Server RACKSPACE® HOSTING | WWW.RACKSPACE.CO.UK
  20. 20. Time Based Autoscaling! GOOD FOR! On & Off! Consistent! RACKSPACE® HOSTING | WWW.RACKSPACE.CO.UK
  21. 21. Reactive Autoscaling! Load Balancer Server 60% Server 60% RACKSPACE® HOSTING | WWW.RACKSPACE.CO.UK
  22. 22. Reactive Autoscaling! Load Balancer Server 80% Server 80% RACKSPACE® HOSTING | WWW.RACKSPACE.CO.UK
  23. 23. Reactive Autoscaling! Load Balancer Server 60% Server 60% Server 40% RACKSPACE® HOSTING | WWW.RACKSPACE.CO.UK
  24. 24. Reactive Autoscaling! Load Balancer Server 30% Server 30% Server 30% RACKSPACE® HOSTING | WWW.RACKSPACE.CO.UK
  25. 25. Reactive Autoscaling! Load Balancer Server 45% Server 45% RACKSPACE® HOSTING | WWW.RACKSPACE.CO.UK
  26. 26. Reactive Autoscaling! GOOD FOR! Fast Growth! Variable! RACKSPACE® HOSTING | WWW.RACKSPACE.CO.UK
  27. 27. Predictive Autoscaling! Load Balancer Server Server RACKSPACE® HOSTING | WWW.RACKSPACE.CO.UK
  28. 28. Predictive Autoscaling! Load Balancer Forecasted! Traffic! Server Server +30%! RACKSPACE® HOSTING | WWW.RACKSPACE.CO.UK
  29. 29. Predictive Autoscaling! Load Balancer Server Server Server RACKSPACE® HOSTING | WWW.RACKSPACE.CO.UK
  30. 30. Predictive Autoscaling! GOOD FOR! Fast Growth! Variable! RACKSPACE® HOSTING | WWW.RACKSPACE.CO.UK
  31. 31. RACKSPACE® HOSTING | WWW.RACKSPACE.CO.UK http://www.flickr.com/photos/samuraislice/3309481048/
  32. 32. Autoscaling Tools! RACKSPACE® HOSTING | WWW.RACKSPACE.CO.UK
  33. 33. Autoscaling Tools! Amazon Cloudformation! Based on Scaling Groups! High/Low Watermark! Scheduled Events! Uses base image + CF! RACKSPACE® HOSTING | WWW.RACKSPACE.CO.UK
  34. 34. Autoscaling Tools! Rackspace Autoscale! Based on Scaling Groups! High/Low Watermark! Scheduled Events! Uses Gold Image! RACKSPACE® HOSTING | WWW.RACKSPACE.CO.UK
  35. 35. Autoscaling Tools! Rightscale Autoscale! Based on Scaling Groups! High/Low Watermark Quorum! Scheduled Events! Uses Rightscale scripts! $$$! RACKSPACE® HOSTING | WWW.RACKSPACE.CO.UK
  36. 36. Autoscaling Tools! Heat! Based on Templates! High/Low Watermark! Scheduled Events! Uses Heat Scripts! DSL Compatible with CF! RACKSPACE® HOSTING | WWW.RACKSPACE.CO.UK
  37. 37. Autoscaling Tools! Scryer! Based on AI! Predictive Fidelity model! Feeds AWS API! RACKSPACE® HOSTING | WWW.RACKSPACE.CO.UK
  38. 38. Autoscaling Tools! Your own!! Collect your metrics! !collectd, diamond, statsd! Have a good metrics database! !whisper, rrd! RACKSPACE® HOSTING | WWW.RACKSPACE.CO.UK
  39. 39. Autoscaling Tools! Your own!! Write your own autoscaling code! !with message queues! :)! !attached to your code! !brain close to the centre of decision! RACKSPACE® HOSTING | WWW.RACKSPACE.CO.UK
  40. 40. RACKSPACE® HOSTING | WWW.RACKSPACE.CO.UK http://www.flickr.com/photos/68751915@N05/6355318323/
  41. 41. Taking the most of it! Beware of the Kraken!! Autoscaling can be dangerous! Have min-max allocations! http://www.flickr.com/photos/liquidnight/5992114196/ RACKSPACE® HOSTING | WWW.RACKSPACE.CO.UK
  42. 42. Taking the most of it! Choose the right metrics! Stay with basic metrics! !CPU, mem, I/O disk/net! Review autoscaling strategy with metrics! RACKSPACE® HOSTING | WWW.RACKSPACE.CO.UK
  43. 43. Taking the most of it! Choose your strategy! Scale up early! Scale down slowly! Don’t apply the same strategy to all apps! RACKSPACE® HOSTING | WWW.RACKSPACE.CO.UK
  44. 44. Taking the most of it! Phasing in and Phasing Out! Have in mind time to availability! Have in mind also decommission time! Golden Images can help speed! RACKSPACE® HOSTING | WWW.RACKSPACE.CO.UK
  45. 45. @lynxman! http://slideshare.net/lynxmanuk/! http://www.rackspace.co.uk/technicalservices/ ! ! RACKSPACE® HOSTING | UK SALES: +44 (0)20 8712 6507 RACKSPACE® HOSTING | © RACKSPACE US, INC. | 5 MILLINGTON ROAD | HAYES, UNITED KINGDOM UB3 4AZ | UK SUPPORT: 0800 988 0300 | WWW.RACKSPACE.CO.UK RACKSPACE® AND FANATICAL SUPPORT® ARE SERVICE MARKS OF RACKSPACE US, INC. REGISTERED IN THE UNITED STATES AND OTHER COUNTRIES. | WWW.RACKSPACE.CO.UK 45
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×