Real Life AWS: user-data & AutoScale Adam Neumann Solutions Architect at IndexMedia [email_address] &
Part 1: user-data What is user-data? A problem user-data in the solution Further work
What is user-data? user specified instance attribute accessible via HTTP and curl/wget usage wrapped by cloud-init 'runs' the user data once on boot great for configuring instances
The concept any script, or init-cloud format #! /bin/bash etc etc cmd line arg or via UI:
A Problem too hard to spin up new instances complex, undocumented, manual fab, bash, and misc scripts slow: 30 min per instance first: consolidate, then: user-data
IndexMedia example 1 small user-data script, bootstrap load big script from S3 setup apache, hadoop, virtualenv,... 16 mins, vanilla ubuntu to serving automated: yes, optimal: no could be improved...
IndexMedia example 2 split script into 2 scripts :) 1: heavy, general, static = 15 min runs on vanilla ubuntu, creates  AMI 2: light, instance specific = 90 secs runs on  AMI from 30 min manual to 90 sec auto
Further work investigate cloud-init format include Puppet/Chef (first, learn Puppet/Chef...) integrate into CI process (environment becomes versioned, deployable, etc)
user-data summary great way to configure instances UI and cmd line accessible enables automated+repeatable deployment reduced deployment time, 30 mins to 90 secs
Part 2: AutoScale What is AutoScale Our (common) problem Show me the examples! Learnings
Part 2: AutoScale cmd line only = no UI = hidden = unknown = scary basically: launching & terminating instances within some bounds based upon metrics a second order system :)
AutoScale concepts 1. Launch Configuration individual: instance type, AMI, user-data, etc 2. AutoScale Group collective: ideal/max/min, AZs 3. Policy how: a reaction, increase, decrease 4. Alerts when: an event, high/low load, CW metrics
Our (common) problem maintain consistent experience for users, ie. Pip load time turn on servers when load is high bootstrapped, must turn off servers when load is low! enter AutoScale...
Solution = AutoScale servers start/stop based upon current system state spending on IT matches user demand exactly! 4 commands to set it up...
1/4: Launch Configuration as-create-launch-config gorilla_config_7d2 \ --image-id ami-XXXXXXX \          --instance-type t1.micro \ --group "gorilla-live"           --key indexmedia-live \ --user-data-file /path/to/bootstrap.sh
2/4: Group as-create-auto-scaling-group as_group \ --launch-configuration gorilla_config_7d2 \ --availability-zones us-west-1a us-west-1b \ --min-size 10 --max-size 20 \ --load-balancers my_balancer \ --health-check-type EC2 \          --grace-period 120
3/4: Policy as-put-scaling-policy gorilla_scaleup_policy \ --auto-scaling-group as_group \          --type ChangeInCapacity \ --adjustment=1
4/4: Alarm mon-put-metric-alarm "gorilla high load" \      --dimensions "AutoScalingGroupName=as_group" \      --namespace "AWS/EC2" \      --statistic Average --metric-name CPUUtilization \      --comparison-operator GreaterThanThreshold \      --threshold 80 \      --evaluation-periods 5 --period 60 \      --alarm-actions ${POLICY-ARN}
... and done! Learnings 4 steps (well 6...) = elastic system feedback = second order system avoid bad harmonics! shorter instance boot time == quicker system  response  time validate alarms & behaviour w/ load tests on AWS
AutoScale summary cmd line only; just jump in! 4 distinct concepts, one per cmd quick boot = shorter grace period = quicker scaling up (enter user-data...) key to our multi-AZ, HA elastic cluster, problem solved!
Thanks + Questions? Adam Neumann Solutions Architect at IndexMedia [email_address]

More Related Content

ODP
Mysql S&M
PDF
Auto Scaling AWS
PPTX
Cache for community edition
 
PPTX
Caching and invalidating with managed store
ODP
AutoScaling and Drupal
KEY
Scaling Django for X Factor - DJUGL Oct 2012
PPTX
Initialize database in Mule part2
PPTX
Mule with drools
Mysql S&M
Auto Scaling AWS
Cache for community edition
 
Caching and invalidating with managed store
AutoScaling and Drupal
Scaling Django for X Factor - DJUGL Oct 2012
Initialize database in Mule part2
Mule with drools

What's hot (9)

PPTX
Timer Interceptor in Mule
PPTX
Microsoft Azure Web Sites Performance Analysis Lessons Learned
PPTX
Cache for community edition
PDF
Lessons Learned at Wakoopa
PDF
Scalr Demo
PPTX
Mule with drools
 
PPTX
All (that i know) about exadata external
PDF
Amazon EC2
PDF
Think Async: Understanding the Complexity of Multithreading - Avi Kabizon & A...
Timer Interceptor in Mule
Microsoft Azure Web Sites Performance Analysis Lessons Learned
Cache for community edition
Lessons Learned at Wakoopa
Scalr Demo
Mule with drools
 
All (that i know) about exadata external
Amazon EC2
Think Async: Understanding the Complexity of Multithreading - Avi Kabizon & A...
Ad

Viewers also liked (7)

PPT
Hearing loss
PDF
Hodges Digital Selected Portfolio
PDF
hD Digital Everywhere.pdf
PPT
Hodges Digital Mobile/Web Porfolio
KEY
AngelCube - Learnings Week 7
PDF
Platform features
PDF
Hodges digital strategies portfolio mobile
Hearing loss
Hodges Digital Selected Portfolio
hD Digital Everywhere.pdf
Hodges Digital Mobile/Web Porfolio
AngelCube - Learnings Week 7
Platform features
Hodges digital strategies portfolio mobile
Ad

Similar to Real life aws_user_data_auto_scale (20)

PDF
Julien Simon "Scaling ML from 0 to millions of users"
PPT
Rapid scaling in_the_cloud_with_puppet
PPTX
AWS Cost Control
PPT
Richard Cole of Amazon Gives Lightning Tallk at BigDataCamp
PPTX
QSpiders - Installation and Brief Dose of Load Runner
PDF
"Scaling in space and time with Temporal", Andriy Lupa.pdf
PDF
Serverless in production, an experience report (London DevOps)
ODT
Guidelhhghghine document final
PDF
"Scaling in space and time with Temporal", Andriy Lupa .pdf
PPT
SaltConf14 - Ben Cane - Using SaltStack in High Availability Environments
PDF
Openstack Cloud Management and Automation Using Red Hat Cloudforms 4.0
PDF
Serverless in production, an experience report (linuxing in london)
PDF
LinuxCon 2013 Steven Dake on Using Heat for autoscaling OpenShift on Openstack
PDF
One-Man Ops
PDF
"Scaling ML from 0 to millions of users", Julien Simon, AWS Dev Day Kyiv 2019
PPT
Quick guide to plan and execute a load test
PDF
AMIMOTO: WordPress + Amazon Web Services Hands-on PARIS
PDF
AWS Study Group - Chapter 03 - Elasticity and Scalability Concepts [Solution ...
PDF
Amazon EMR Masterclass
PPTX
Serverless Computing & Automation - GCP
Julien Simon "Scaling ML from 0 to millions of users"
Rapid scaling in_the_cloud_with_puppet
AWS Cost Control
Richard Cole of Amazon Gives Lightning Tallk at BigDataCamp
QSpiders - Installation and Brief Dose of Load Runner
"Scaling in space and time with Temporal", Andriy Lupa.pdf
Serverless in production, an experience report (London DevOps)
Guidelhhghghine document final
"Scaling in space and time with Temporal", Andriy Lupa .pdf
SaltConf14 - Ben Cane - Using SaltStack in High Availability Environments
Openstack Cloud Management and Automation Using Red Hat Cloudforms 4.0
Serverless in production, an experience report (linuxing in london)
LinuxCon 2013 Steven Dake on Using Heat for autoscaling OpenShift on Openstack
One-Man Ops
"Scaling ML from 0 to millions of users", Julien Simon, AWS Dev Day Kyiv 2019
Quick guide to plan and execute a load test
AMIMOTO: WordPress + Amazon Web Services Hands-on PARIS
AWS Study Group - Chapter 03 - Elasticity and Scalability Concepts [Solution ...
Amazon EMR Masterclass
Serverless Computing & Automation - GCP

Recently uploaded (20)

PDF
sustainability-14-14877-v2.pddhzftheheeeee
PDF
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
PPTX
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
PPTX
The various Industrial Revolutions .pptx
PDF
Hybrid horned lizard optimization algorithm-aquila optimizer for DC motor
PDF
OpenACC and Open Hackathons Monthly Highlights July 2025
PDF
A proposed approach for plagiarism detection in Myanmar Unicode text
PPTX
Microsoft Excel 365/2024 Beginner's training
PDF
How ambidextrous entrepreneurial leaders react to the artificial intelligence...
PDF
Developing a website for English-speaking practice to English as a foreign la...
PPT
Galois Field Theory of Risk: A Perspective, Protocol, and Mathematical Backgr...
PDF
Getting started with AI Agents and Multi-Agent Systems
PDF
Zenith AI: Advanced Artificial Intelligence
PDF
TrustArc Webinar - Click, Consent, Trust: Winning the Privacy Game
PPTX
Chapter 5: Probability Theory and Statistics
PPTX
Final SEM Unit 1 for mit wpu at pune .pptx
PDF
NewMind AI Weekly Chronicles – August ’25 Week III
PDF
Convolutional neural network based encoder-decoder for efficient real-time ob...
PDF
STKI Israel Market Study 2025 version august
PDF
Abstractive summarization using multilingual text-to-text transfer transforme...
sustainability-14-14877-v2.pddhzftheheeeee
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
The various Industrial Revolutions .pptx
Hybrid horned lizard optimization algorithm-aquila optimizer for DC motor
OpenACC and Open Hackathons Monthly Highlights July 2025
A proposed approach for plagiarism detection in Myanmar Unicode text
Microsoft Excel 365/2024 Beginner's training
How ambidextrous entrepreneurial leaders react to the artificial intelligence...
Developing a website for English-speaking practice to English as a foreign la...
Galois Field Theory of Risk: A Perspective, Protocol, and Mathematical Backgr...
Getting started with AI Agents and Multi-Agent Systems
Zenith AI: Advanced Artificial Intelligence
TrustArc Webinar - Click, Consent, Trust: Winning the Privacy Game
Chapter 5: Probability Theory and Statistics
Final SEM Unit 1 for mit wpu at pune .pptx
NewMind AI Weekly Chronicles – August ’25 Week III
Convolutional neural network based encoder-decoder for efficient real-time ob...
STKI Israel Market Study 2025 version august
Abstractive summarization using multilingual text-to-text transfer transforme...

Real life aws_user_data_auto_scale

  • 1. Real Life AWS: user-data & AutoScale Adam Neumann Solutions Architect at IndexMedia [email_address] &
  • 2. Part 1: user-data What is user-data? A problem user-data in the solution Further work
  • 3. What is user-data? user specified instance attribute accessible via HTTP and curl/wget usage wrapped by cloud-init 'runs' the user data once on boot great for configuring instances
  • 4. The concept any script, or init-cloud format #! /bin/bash etc etc cmd line arg or via UI:
  • 5. A Problem too hard to spin up new instances complex, undocumented, manual fab, bash, and misc scripts slow: 30 min per instance first: consolidate, then: user-data
  • 6. IndexMedia example 1 small user-data script, bootstrap load big script from S3 setup apache, hadoop, virtualenv,... 16 mins, vanilla ubuntu to serving automated: yes, optimal: no could be improved...
  • 7. IndexMedia example 2 split script into 2 scripts :) 1: heavy, general, static = 15 min runs on vanilla ubuntu, creates AMI 2: light, instance specific = 90 secs runs on AMI from 30 min manual to 90 sec auto
  • 8. Further work investigate cloud-init format include Puppet/Chef (first, learn Puppet/Chef...) integrate into CI process (environment becomes versioned, deployable, etc)
  • 9. user-data summary great way to configure instances UI and cmd line accessible enables automated+repeatable deployment reduced deployment time, 30 mins to 90 secs
  • 10. Part 2: AutoScale What is AutoScale Our (common) problem Show me the examples! Learnings
  • 11. Part 2: AutoScale cmd line only = no UI = hidden = unknown = scary basically: launching & terminating instances within some bounds based upon metrics a second order system :)
  • 12. AutoScale concepts 1. Launch Configuration individual: instance type, AMI, user-data, etc 2. AutoScale Group collective: ideal/max/min, AZs 3. Policy how: a reaction, increase, decrease 4. Alerts when: an event, high/low load, CW metrics
  • 13. Our (common) problem maintain consistent experience for users, ie. Pip load time turn on servers when load is high bootstrapped, must turn off servers when load is low! enter AutoScale...
  • 14. Solution = AutoScale servers start/stop based upon current system state spending on IT matches user demand exactly! 4 commands to set it up...
  • 15. 1/4: Launch Configuration as-create-launch-config gorilla_config_7d2 \ --image-id ami-XXXXXXX \          --instance-type t1.micro \ --group "gorilla-live"           --key indexmedia-live \ --user-data-file /path/to/bootstrap.sh
  • 16. 2/4: Group as-create-auto-scaling-group as_group \ --launch-configuration gorilla_config_7d2 \ --availability-zones us-west-1a us-west-1b \ --min-size 10 --max-size 20 \ --load-balancers my_balancer \ --health-check-type EC2 \          --grace-period 120
  • 17. 3/4: Policy as-put-scaling-policy gorilla_scaleup_policy \ --auto-scaling-group as_group \          --type ChangeInCapacity \ --adjustment=1
  • 18. 4/4: Alarm mon-put-metric-alarm "gorilla high load" \      --dimensions "AutoScalingGroupName=as_group" \      --namespace "AWS/EC2" \      --statistic Average --metric-name CPUUtilization \      --comparison-operator GreaterThanThreshold \      --threshold 80 \      --evaluation-periods 5 --period 60 \      --alarm-actions ${POLICY-ARN}
  • 19. ... and done! Learnings 4 steps (well 6...) = elastic system feedback = second order system avoid bad harmonics! shorter instance boot time == quicker system  response time validate alarms & behaviour w/ load tests on AWS
  • 20. AutoScale summary cmd line only; just jump in! 4 distinct concepts, one per cmd quick boot = shorter grace period = quicker scaling up (enter user-data...) key to our multi-AZ, HA elastic cluster, problem solved!
  • 21. Thanks + Questions? Adam Neumann Solutions Architect at IndexMedia [email_address]