Autoscaling, Chef and New Relic
-
Upload
fernando-honig -
Category
Internet
-
view
136 -
download
0
description
Transcript of Autoscaling, Chef and New Relic
![Page 1: Autoscaling, Chef and New Relic](https://reader034.fdocuments.us/reader034/viewer/2022042614/559869ab1a28ab1a0b8b45f7/html5/thumbnails/1.jpg)
FERNANDO
HONIG
DevOps & Automation
Autoscaling
+Chef +New Relic
![Page 2: Autoscaling, Chef and New Relic](https://reader034.fdocuments.us/reader034/viewer/2022042614/559869ab1a28ab1a0b8b45f7/html5/thumbnails/2.jpg)
ABOUT
ME
More than 10 years of experience
Worked at Intel, IBM, HP
@fernandohonig
http://github.com/fernandohonig
FERNANDO
HONIG
Senior Automation Engineer
![Page 3: Autoscaling, Chef and New Relic](https://reader034.fdocuments.us/reader034/viewer/2022042614/559869ab1a28ab1a0b8b45f7/html5/thumbnails/3.jpg)
RACKSPACE & DevOps Automation
CONFIGURATION
MANAGEMENT
APPLICATION
SCALE
APPLICATION
INSIGHT
YOU CODE
THE APP
WE’LL DO
THE REST
![Page 4: Autoscaling, Chef and New Relic](https://reader034.fdocuments.us/reader034/viewer/2022042614/559869ab1a28ab1a0b8b45f7/html5/thumbnails/4.jpg)
PROBLEMS
Why to Autoscale?
How/When to Autoscale?
AUTOSCALING SCENARIOS
SELF-HEALING
New Relic Webhooks
Application Stressing
Load Balancer and Autoscaling
HEAT ORCHESTRATION
Full Deployment Stack
Horizontal Scale Up
BLUE/GREEN DEPLOYMENTS
Jenkins + Chef + Autoscale
Autoscaling+Chef +New Relic
![Page 5: Autoscaling, Chef and New Relic](https://reader034.fdocuments.us/reader034/viewer/2022042614/559869ab1a28ab1a0b8b45f7/html5/thumbnails/5.jpg)
AUTOSCALING: What?
The act of changing the
pool of resources
able to serve requests
without manual intervention
![Page 6: Autoscaling, Chef and New Relic](https://reader034.fdocuments.us/reader034/viewer/2022042614/559869ab1a28ab1a0b8b45f7/html5/thumbnails/6.jpg)
PROBLEMS: Why?
![Page 7: Autoscaling, Chef and New Relic](https://reader034.fdocuments.us/reader034/viewer/2022042614/559869ab1a28ab1a0b8b45f7/html5/thumbnails/7.jpg)
PROBLEMS: Why?
![Page 8: Autoscaling, Chef and New Relic](https://reader034.fdocuments.us/reader034/viewer/2022042614/559869ab1a28ab1a0b8b45f7/html5/thumbnails/8.jpg)
AUTOSCALING: Strategy
SEVERITY OF SPIKE:
Is this a Reddit spike or a casual increase?
TIME TO PROVISION:
Benchmark and test the time it takes to create new infrastructure.
EARLY WARNING:
What is the earliest observed anomaly in a monitoring system that predicts
this spike?
PER NODE CAPACITY:
Load test individual nodes and your baseline platform to better understand
how much natural elasticity is in your platform.
![Page 9: Autoscaling, Chef and New Relic](https://reader034.fdocuments.us/reader034/viewer/2022042614/559869ab1a28ab1a0b8b45f7/html5/thumbnails/9.jpg)
PROBLEMS: How? When?
SCALE UP
![Page 10: Autoscaling, Chef and New Relic](https://reader034.fdocuments.us/reader034/viewer/2022042614/559869ab1a28ab1a0b8b45f7/html5/thumbnails/10.jpg)
PROBLEMS: How? When?
SCALE
DOWN
NEW RELIC
![Page 11: Autoscaling, Chef and New Relic](https://reader034.fdocuments.us/reader034/viewer/2022042614/559869ab1a28ab1a0b8b45f7/html5/thumbnails/11.jpg)
PROBLEMS: Scaling down?
SCALING DOWN,
SESSIONS, NEW
ARCHITECTURE
LOADBALANCER
WEBSITE
WWW
LOADBALANCER
WEBSITE
WWW
![Page 12: Autoscaling, Chef and New Relic](https://reader034.fdocuments.us/reader034/viewer/2022042614/559869ab1a28ab1a0b8b45f7/html5/thumbnails/12.jpg)
AUTOSCALING: Early warning!
![Page 13: Autoscaling, Chef and New Relic](https://reader034.fdocuments.us/reader034/viewer/2022042614/559869ab1a28ab1a0b8b45f7/html5/thumbnails/13.jpg)
Monitor applications performance using NewRelic
Use NewRelic APDEX score to monitor application
performance
Scale up on demand based on NewRelic stats
(Self heal)
When threshold breached fire alert to webhook
Auto register node with application in NewRelic
Scale down when compute no longer needed
AUTOSCALING:
EARLY
WARNING!
![Page 14: Autoscaling, Chef and New Relic](https://reader034.fdocuments.us/reader034/viewer/2022042614/559869ab1a28ab1a0b8b45f7/html5/thumbnails/14.jpg)
TOOLS!
CONFIG MGMT CODE MGMT MONITORING
![Page 15: Autoscaling, Chef and New Relic](https://reader034.fdocuments.us/reader034/viewer/2022042614/559869ab1a28ab1a0b8b45f7/html5/thumbnails/15.jpg)
LOADBALANCER
WEBSITE - SERVERS
VISITORS
WEBSITE STARTS HAVING MORE LOAD
STEP 1: START
WEBSITE
WWW
NEW RELIC
![Page 16: Autoscaling, Chef and New Relic](https://reader034.fdocuments.us/reader034/viewer/2022042614/559869ab1a28ab1a0b8b45f7/html5/thumbnails/16.jpg)
NEW RELIC APP MONITORING TRIGGERS
A WEBHOOK FIRING AN AUTOSCALE EVENT
STEP 2: ALERT
WWW
NEW RELIC AUTO SCALE SERVICE LOADBALANCER
WEBSITE - SERVERS
![Page 17: Autoscaling, Chef and New Relic](https://reader034.fdocuments.us/reader034/viewer/2022042614/559869ab1a28ab1a0b8b45f7/html5/thumbnails/17.jpg)
AUTOSCALING GROUP LAUNCHES MORE
COMPUTE CAPACITY
STEP 3: SCALE UP
WEBSITE+
SERVERS BUILDING
WEBSITE – SERVERS ACTIVE
WWW
NEW RELIC AUTO SCALE SERVICE LOADBALANCER
![Page 18: Autoscaling, Chef and New Relic](https://reader034.fdocuments.us/reader034/viewer/2022042614/559869ab1a28ab1a0b8b45f7/html5/thumbnails/18.jpg)
STEP 4: CONFIGURE
CHEF AUTOMATICALLY CONFIGURES
THE NEW SERVERS
WEBSITE - SERVERSWEBSITE - SERVERS
chefLOADBALANCER
WEBSITE
WWW
![Page 19: Autoscaling, Chef and New Relic](https://reader034.fdocuments.us/reader034/viewer/2022042614/559869ab1a28ab1a0b8b45f7/html5/thumbnails/19.jpg)
STEP 5: COMPLETE
THE NEW SERVERS ARE FULLY
DEPLOYED & IN PRODUCTION
NEW RELIC MONITORS THE
WEBSITE & PROVIDES
CUSTOMER WITH
PRO-ACTIVE INSIGHT
CUSTOMER NEW RELIC
WEBSITE - SERVERS
LOADBALANCER
WEBSITE
WWW
![Page 20: Autoscaling, Chef and New Relic](https://reader034.fdocuments.us/reader034/viewer/2022042614/559869ab1a28ab1a0b8b45f7/html5/thumbnails/20.jpg)
SERVERS REMOVED
STEP 6: DOWN
WHEN APPLICATION RECOVERED
OLD SERVERS ARE BEING REMOVED
WEBSITE – SERVERS ACTIVE
LOADBALANCER
WEBSITE
WWW
![Page 21: Autoscaling, Chef and New Relic](https://reader034.fdocuments.us/reader034/viewer/2022042614/559869ab1a28ab1a0b8b45f7/html5/thumbnails/21.jpg)
DEMO
![Page 22: Autoscaling, Chef and New Relic](https://reader034.fdocuments.us/reader034/viewer/2022042614/559869ab1a28ab1a0b8b45f7/html5/thumbnails/22.jpg)
AUTOSCALING: Heat Orchestration
![Page 23: Autoscaling, Chef and New Relic](https://reader034.fdocuments.us/reader034/viewer/2022042614/559869ab1a28ab1a0b8b45f7/html5/thumbnails/23.jpg)
Declare the infrastructure in one simple text file (YAML)
Create, update, connect and manage groups of cloud resources and their software components as a single unit (stack)
Automated, repeatable
HEAT
ORCHESTRATION
![Page 24: Autoscaling, Chef and New Relic](https://reader034.fdocuments.us/reader034/viewer/2022042614/559869ab1a28ab1a0b8b45f7/html5/thumbnails/24.jpg)
PROBLEM: Environments
DEV = UAT = PRD:
Do we have the same architecture across all environments?
TROUBLESHOOTING:
Is the problem related to the infrastructure or code?
QUICK ENVIRONMENT TEST:
If we need an environment just for a few hours, or for a specific purpose?
![Page 25: Autoscaling, Chef and New Relic](https://reader034.fdocuments.us/reader034/viewer/2022042614/559869ab1a28ab1a0b8b45f7/html5/thumbnails/25.jpg)
TOOLS!
CONFIG MGMT CODE MGMT MONITORING
![Page 26: Autoscaling, Chef and New Relic](https://reader034.fdocuments.us/reader034/viewer/2022042614/559869ab1a28ab1a0b8b45f7/html5/thumbnails/26.jpg)
heat_template_version: 2013-05-23
description:
# a description of the template
parameters:
# declaration of input parameters
resources:
# declaration of template resources
outputs:
# declaration of output parameters
HEAT
ORCHESTRATION
![Page 27: Autoscaling, Chef and New Relic](https://reader034.fdocuments.us/reader034/viewer/2022042614/559869ab1a28ab1a0b8b45f7/html5/thumbnails/27.jpg)
HEAT ORCHESTRATION: Code!
http://goo.gl/xApJg1
![Page 28: Autoscaling, Chef and New Relic](https://reader034.fdocuments.us/reader034/viewer/2022042614/559869ab1a28ab1a0b8b45f7/html5/thumbnails/28.jpg)
LOADBALANCER
STEP 1: DEPLOY
THE TEMPLATE CONTAINS THE
AUTOSCALING GROUP, THE LB,
THE POLICIES AND WEBHOOKS
TEMPLATE CONTAINS ALL THE
CHEF INFORMATION TO
BOOTSTRAP THE NODE
WITHIN THE RIGHT
ENVIRONMENT AND ROLE.
CUSTOMER
STACK
ELK
![Page 29: Autoscaling, Chef and New Relic](https://reader034.fdocuments.us/reader034/viewer/2022042614/559869ab1a28ab1a0b8b45f7/html5/thumbnails/29.jpg)
LOADBALANCER
TEMPLATE CONTAINS ALL THE
CHEF INFORMATION TO
BOOTSTRAP THE NODE
WITHIN THE RIGHT
ENVIRONMENT AND ROLE.
CUSTOMER
STACK
ELKSTEP 2: SCALE
THE TEMPLATE CONTAINS THE
AUTOSCALING GROUP, THE LB,
THE POLICIES, AND WEBHOOKS
AUTO SCALE SERVICE
![Page 30: Autoscaling, Chef and New Relic](https://reader034.fdocuments.us/reader034/viewer/2022042614/559869ab1a28ab1a0b8b45f7/html5/thumbnails/30.jpg)
STEP 3: CONFIGURE
THE STACK WILL BE CONFIGURED
AND ADDED TO THE LB BASED ON
CHEF AUTOMATION
chef LOADBALANCER
TEMPLATE CONTAINS ALL THE
CHEF INFORMATION TO
BOOTSTRAP THE NODE
WITHIN THE RIGHT
ENVIRONMENT AND ROLE.
STACK
ELK
![Page 31: Autoscaling, Chef and New Relic](https://reader034.fdocuments.us/reader034/viewer/2022042614/559869ab1a28ab1a0b8b45f7/html5/thumbnails/31.jpg)
DEMO
![Page 32: Autoscaling, Chef and New Relic](https://reader034.fdocuments.us/reader034/viewer/2022042614/559869ab1a28ab1a0b8b45f7/html5/thumbnails/32.jpg)
AUTOSCALING: B/G Deployment
![Page 33: Autoscaling, Chef and New Relic](https://reader034.fdocuments.us/reader034/viewer/2022042614/559869ab1a28ab1a0b8b45f7/html5/thumbnails/33.jpg)
PROBLEM: Deployments
TIME TO MARKET:
Why spend 8hs for doing a deployment? Can’t I just code my app?
AUTOMATION:
I am human, I forgot to execute this step, rollback is needed.
BRAND NEW ENVIRONMENT:
What if my old component is not compatible with the new one?
![Page 34: Autoscaling, Chef and New Relic](https://reader034.fdocuments.us/reader034/viewer/2022042614/559869ab1a28ab1a0b8b45f7/html5/thumbnails/34.jpg)
![Page 35: Autoscaling, Chef and New Relic](https://reader034.fdocuments.us/reader034/viewer/2022042614/559869ab1a28ab1a0b8b45f7/html5/thumbnails/35.jpg)
Increase efficiency in the application release cycle
Allow the customer to focus on their core business
Fully automated one click deployment
Faster delivery of code to production
Easy roll back and in timely manner
BLUE-
GREEN
DEPLOYMENTS
![Page 36: Autoscaling, Chef and New Relic](https://reader034.fdocuments.us/reader034/viewer/2022042614/559869ab1a28ab1a0b8b45f7/html5/thumbnails/36.jpg)
TOOLS!
CONFIG MGMT CODE MGMT WORKFLOW
![Page 37: Autoscaling, Chef and New Relic](https://reader034.fdocuments.us/reader034/viewer/2022042614/559869ab1a28ab1a0b8b45f7/html5/thumbnails/37.jpg)
LOADBALANCER
CUSTOMER
CUSTOMER DEVELOPS NEW VERSION
OF THEIR WEBSITE (WEBSITE 2.0)
STEP 1: DESIGN
WEBSITE 1.0
WWW
WEBSITE1.0 - SERVERS
![Page 38: Autoscaling, Chef and New Relic](https://reader034.fdocuments.us/reader034/viewer/2022042614/559869ab1a28ab1a0b8b45f7/html5/thumbnails/38.jpg)
STEP 2: DEPLOY
JENKINS
CUSTOMER DEPLOYS NEW VERSION
OF THEIR WEBSITE (WEBSITE 2.0)
NO FURTHER INTERACTION REQUIRED
FULLY AUTOMATED FROM HERE ON OUT
LOADBALANCER
CUSTOMER
WEBSITE 1.0
WWW
WEBSITE1.0 - SERVERS
![Page 39: Autoscaling, Chef and New Relic](https://reader034.fdocuments.us/reader034/viewer/2022042614/559869ab1a28ab1a0b8b45f7/html5/thumbnails/39.jpg)
STEP 3: SCALE UP
JENKINS
AUTO SCALE SPINS UP NEW SERVERS
WEBSITE 1.0 - SERVERS
AUTO SCALE SERVICE
WEBSITE 2.0 - SERVERS
LOADBALANCER
WEBSITE 1.0
WWW
![Page 40: Autoscaling, Chef and New Relic](https://reader034.fdocuments.us/reader034/viewer/2022042614/559869ab1a28ab1a0b8b45f7/html5/thumbnails/40.jpg)
STEP 4: CONFIGURE
CHEF AUTOMATICALLY CONFIGURES
THE NEW SERVERS
WEBSITE 1.0 - SERVERSWEBSITE 2.0 - SERVERS
chefLOADBALANCER
WEBSITE 1.0
WWW
![Page 41: Autoscaling, Chef and New Relic](https://reader034.fdocuments.us/reader034/viewer/2022042614/559869ab1a28ab1a0b8b45f7/html5/thumbnails/41.jpg)
STEP 5: SCALE DOWN
JENKINS
JENKINS INITITIATES THE AUTOMATIC
SPIN DOWN OF THE OLD SERVERS
WEBSITE 2.0 - SERVERS
AUTO SCALE SERVICE
WEBSITE 1.0 SERVERS
LOADBALANCER
WEBSITE 1.0
WWW
![Page 42: Autoscaling, Chef and New Relic](https://reader034.fdocuments.us/reader034/viewer/2022042614/559869ab1a28ab1a0b8b45f7/html5/thumbnails/42.jpg)
WEBSITE 2.0 - SERVERS
STEP 6: PRODUCTION
THE NEW WEBSITE IS FULLY
DEPLOYED & IN PRODUCTION
NEW RELIC MONITORS THE WEBSITE
& PROVIDES CUSTOMER WITH
PRO-ACTIVE INSIGHT
CUSTOMER NEW RELIC
LOADBALANCER
WEBSITE 2.0
WWW
![Page 43: Autoscaling, Chef and New Relic](https://reader034.fdocuments.us/reader034/viewer/2022042614/559869ab1a28ab1a0b8b45f7/html5/thumbnails/43.jpg)
DEMO
![Page 44: Autoscaling, Chef and New Relic](https://reader034.fdocuments.us/reader034/viewer/2022042614/559869ab1a28ab1a0b8b45f7/html5/thumbnails/44.jpg)
SUMMARY
Autoscaling and Strategies behind
Application Architecture and scaling
Deployment enhancement using AS
![Page 45: Autoscaling, Chef and New Relic](https://reader034.fdocuments.us/reader034/viewer/2022042614/559869ab1a28ab1a0b8b45f7/html5/thumbnails/45.jpg)
Q&A
![Page 46: Autoscaling, Chef and New Relic](https://reader034.fdocuments.us/reader034/viewer/2022042614/559869ab1a28ab1a0b8b45f7/html5/thumbnails/46.jpg)
WHAT’S
NEXT?
www.rackspace.co.uk/devops
![Page 47: Autoscaling, Chef and New Relic](https://reader034.fdocuments.us/reader034/viewer/2022042614/559869ab1a28ab1a0b8b45f7/html5/thumbnails/47.jpg)
THANK YOU
RACKSPACE® | 1 FANATICAL PLACE, CITY OF WINDCREST | SAN ANTONIO, TX 78218
US SALES: 1-800-961-2888 | US SUPPORT: 1-800-961-4454 | WWW.RACKSPACE.COM
© RACKSPACE LTD. | RACKSPACE® AND FANATICAL SUPPORT® ARE SERVICE MARKS OF RACKSPACE US, INC. REGISTERED IN THE UNITED S TATES AND OTHER COUNTRIES. | WWW.RACKSPACE.COM
RACKSPACE® | 5 MILLINGTON ROAD | HAYES, UNITED KINGDOM UB3 4AZ
UK SALES: +44 (0)20 8712 6507 | UK SUPPORT: 0800 988 0300 | WWW.RACKSPACE.CO.UK
www.rackspace.co.uk/devops