SlideShare une entreprise Scribd logo
1  sur  54
Télécharger pour lire hors ligne
Nathan Handler
nhandler@yelp.com / @nathanhandler
PaaSTA
Autoscaling at Yelp
● Nathan Handler / @nathanhandler
● Site Reliability Engineer at Yelp
● PaaSTA Developer and Maintainer
● Ubuntu/Debian GNU/Linux Developer
● freenode IRC staff member
Who am I?
2
Yelp’s Mission
Connecting people with great
local businesses.
3
Yelp Stats
As of Q3 2016
97M 3274%115M
● Monolithic Python application (~3M LoC)
● Builds/deployments took a long time
○ Bottleneck on how often we can deploy
● Mistakes are painful
○ Large impact
○ Difficult to find
○ Slow to fix
History
5
● Split features into different applications
● Smaller services allowed for faster pushes
● Easier to reason about issues
● Able to scale services independently
Service Oriented Architecture v1
6
● Standalone application
● Stateless
● Separate git repository
● Typically at Yelp:
○ HTTP API
○ Python, Pyramid, uWSGI
○ virtualenv
What is a service?
7
● Statically defined list of hosts to deploy a service on
● Operations decides which hosts to deploy to
● Monitoring manually configured in Nagios
● Manual deployment system via rsync
Deploying Services v1
8
3x
2x
Does Not Scale
9
1x
3x
2x
Does Not Scale
10
1x
● Yelp's Platform as a Service
● Builds, Deploys, Connects, and Monitors services
● Glue around existing and established open source
tools
PaaSTA
11
https://github.com/yelp/paasta
#paasta on irc.freenode.net
12
PaaSTA Components
13
Docker
Registry
Developer
git push
git pull
git push
docker push
13
Marathon
Sensu
PaaSTA Components
14
Developer
git push
14
.
├── Dockerfile
├── htdocs
│ ├── index.php
│ └── status
└── Makefile
15
A simple service
DOCKER_TAG ?= $(USER)-dev
test:
@echo 'Unit testing'
itest: cook-image
paasta local-run --healthcheck --service devops
cook-image:
docker build -t $(DOCKER_TAG) .
16
$ cat Makefile
DOCKER_TAG ?= $(USER)-dev
test:
@echo 'Unit testing'
itest: cook-image
paasta local-run --healthcheck --service devops
cook-image:
docker build -t $(DOCKER_TAG) .
17
$ cat Makefile
Containers: like lightweight VMs
Provides a language (Dockerfile) for describing
container image
Reproducible builds (mostly)
Provides software flexibility
18
Docker
docker.com
FROM ubuntu:xenial
MAINTAINER Nathan Handler <nhandler@yelp.com>
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -y install 
apache2 
libapache2-mod-php
ENV APACHE_RUN_USER www-data
ENV APACHE_RUN_GROUP www-data
ENV APACHE_LOG_DIR /var/log/apache2
ENV APACHE_LOCK_DIR /var/lock/apache2
ENV APACHE_PID_FILE /var/run/apache2.pid
RUN rm -f /var/www/html/index.html
COPY htdocs /var/www/html/
CMD ["/usr/sbin/apache2", "-D", "FOREGROUND", "-C", "listen 8888"]
EXPOSE 8888 19
$ cat Dockerfile
✓ yelpsoa-config directory for devops found in /nail/etc/serv
✓ deploy.yaml exists for a Jenkins pipeline
✗ No 'security-check' entry was found in your deploy.yaml.
Please add a security-check entry *AFTER* the itest entry in d
so your docker image can be checked against known security vul
More info: http://servicedocs.yelpcorp.com/docs/paasta_tools/c
✗ No 'performance-check' entry was found in your deploy.yaml.
Please add a performance-check entry *AFTER* the security-chec
so your docker image can be checked for performance regression
More info: http://servicedocs.yelpcorp.com/docs/paasta_tools/c
✓ Jenkins build pipeline found
✓ Git repo found in the expected location.
✓ Found Dockerfile
✓ A Makefile is present
✓ The Makefile contains a tab character
✓ The Makefile contains a docker tag
✓ The Makefile responds to `make cook-image`
✓ The Makefile responds to `make itest`
✓ The Makefile responds to `make test`
✓ Found marathon.yaml file.
✓ All entries in deploy.yaml correspond to a marathon or chro
✓ All marathon instances have a corresponding deploy.yaml ent
✓ monitoring.yaml found for Sensu monitoring
✓ Your service uses Sensu and team 'nhandler' will get alerts
✓ Found smartstack.yaml file
✓ Instance 'demo' of your service is using smartstack port 20
balanced
✓ Successfully validated schema: marathon-nova-devc.yaml
20
$ paasta check
PaaSTA Components
21
Docker
Registry
Developer
git push
git pull
git push
docker push
21
---
pipeline:
- instancename: itest
- instancename: push-to-registry
- instancename: dev.everything
22
$ cat deploy.yaml
Jenkins Pipeline
23
paasta-nova-devc.demo-20160503T231914-deploy
paasta-nova-devc.demo-20160503T234021-stop
paasta-nova-devc.demo-20160503T234202-start
24
$ git tag
Describe end goal, not path
Helps us achieve fault tolerance.
"Deploy 6de16ff2 to prod"
vs.
"Commit 6de16ff2 should be running in prod"
Gas pedal vs. Cruise Control
25
Declarative control
Description: A demo PaaSTA service for OSCON 2016
External Link:
http://conferences.oreilly.com/oscon/open-source-us/public/schedule/detail/49358
Monitored By: team nhandler
Runbook: Please set a `runbook` field in your monitoring.yaml. Like "y/rb-m
Docs: https://trac.yelpcorp.com/wiki/HowToService/Monitoring/monitoring.yam
Git Repo: git@git.yelpcorp.com:services/devops
Jenkins Pipeline: https://jenkins.yelpcorp.com/view/services-devops
Deployed to the following clusters:
- nova-devc (N/A)
Smartstack endpoint(s):
- http://169.254.255.254:20973 (demo)
Dashboard(s):
- https://uchiwa.yelpcorp.com/#/events?q=devops (Sensu Alerts)
26
$ paasta info
PaaSTA Components
27
Docker
Registry
Developer
git push
git pull
git push
docker push
27
Marathon
Mesos is an "SDK for distributed systems", not
batteries-included.
Requires a framework
• Marathon
• Chronos
Can run many frameworks on the same cluster
Supports Docker as task executor
28
mesosphere.io
mesos.apache.org
Scheduling: Mesos + Marathon
---
main:
cpus: 0.1
instances: 3
mem: 500
29
$ cat marathon-nova-devc.yaml
PaaSTA Components
30
Docker
Registry
Developer
git push
git pull
git push
docker push
30
Marathon
● Brutal: Stops old versions and starts the new
version, without regard to safety.
● Upthendown: Brings up the new version of the
service and waits until all instances are healthy
before stopping the old versions.
● Downthenup: Stops any old versions and waits for
them to die before starting the new version.
● Crossover: Starts the new version, and gradually kills
instances of the old versions as new instances
become healthy.
Bounce Strategies
31
32
Discovery in PaaSTA: Smartstack
mesos
slave
box2
client
nerve
HAProxy
synapse
box1
service
nerve
mesos
slave
synapse
HAProxy
ZooKeeperMetadata
HTTP request
healthcheck
33
Latency Zones
Superregion
Region
Habitat
---
demo:
advertise: [region]
discover: region
proxy_port: 20973
34
$ cat smartstack.yaml
● Reduce/Eliminate Manual Scaling
● Stop Overprovisioning
● Save Money on our Infrastructure Bill
● Increase Reliability
Why Autoscale?
35
Pipeline: https://jenkins.yelpcorp.com/view/services-devops
cluster: nova-devc
instance: demo
Git sha: 6de16ff2
State: Running - Desired state: Started
Marathon: Healthy - up with (3/3) instances. Status: Running.
Mesos: Healthy - (3/3) tasks in the TASK_RUNNING state.
Smartstack:
Name LastCheck LastChange Status
useast1-devc - Healthy - in haproxy with (3/3) total backends UP in this namespace.
36
$ paasta status
Autoscaling Should Be Easy
37
---
main:
cpus: 0.1
instances: 3
mem: 500
38
$ cat marathon-nova-devc.yaml
---
main:
cpus: 0.1
min_instances: 3
max_instances: 5
mem: 500
39
$ cat marathon-nova-devc.yaml
Autoscaling Should Be Flexible
40
● mesos_cpu: Tries to use CPU usage to predict when
to autoscale (Default)
● http: Makes a request on a HTTP endpoint on your
service. Expects a JSON-formatted dictionary with a
'utilization' field containing a number 0-1
● uwsgi: Uses the percentage of non-idle workers as
the utilization metric
Metrics Providers
41
● pid: Uses a PID controller to determine when to
autoscale a service
● threshold: Autoscales when a service’s utilization
exceeds beyond a certain threshold.
● bespoke: Allows a service author to implement their
own autoscaling.
Decision Policies
42
---
main:
cpus: 0.1
min_instances: 3
max_instances: 12
mem: 500
autoscaling:
metrics_provider: http
endpoint: metrics.json
decision_policy: threshold
setpoint: 0.5
43
$ cat marathon-nova-devc.yaml
Autoscaling
44
● Examines all resources tracked by PaaSTA
○ Scales based on the "worst" value
● Supports scaling pools independently
● Supports a configurable target_utilization
● Supports both ASGs and SFRs in AWS
Cluster Autoscaler
45
Cluster: mesosstage
Dashboards:
Marathon RO: http://marathon.paasta-mesosstage.yelp/
Smartstack: http://paasta-mesosstage.yelp:3212
Chronos RO: http://chronos.paasta-mesosstage.yelp/
Mesos: http://mesos.paasta-mesosstage.yelp
Mesos Status: OK
quorum: masters: 3 configured quorum: 2
frameworks:
framework: chronos-2.4.0 count: 1
framework: marathon count: 1
CPUs: 1.00 / 7 in use (14.29%)
Memory: 3.03 / 42.85GB in use (7.07%)
Disk: 10.00 / 153.81GB in use (6.50%)
tasks: running: 9 staging: 1 starting: 0
slaves: active: 7 inactive: 0
Marathon Status: OK
marathon apps: 5
marathon tasks: 9
marathon deployments: 0
Chronos Status: OK
Enabled chronos jobs: 1 46
$ paasta metastatus
module "nova-devc-useast1a-demo" {
source = ".../terraform-modules/paasta_spot_cluster"
cluster = "nova-devc"
ecosystem = "${var.ecosystem}"
min_capacity = 2
max_capacity = 20
initial_target_capacity = 5
ami_type = "paasta"
spot_price = 0.1337
instance_profile = "paasta"
pool = "demo"
}
47
Terraform'ed PaaSTA Pool
● Scaling up is safe and easy
● Scaling down can be risky
Scaling Safely
48
● Utilizes Mesos Maintenance Primitives
● Attempts to dynamically reserve all available
resources on a host
● Scales up the service by the number of instances
running on the host that is in maintenance
● Terminates the host once it is fully drained or it
reaches its timeout
PaaSTA Maintenance
49
PaaSTA Components
50
Docker
Registry
Developer
git push
git pull
git push
docker push
50
Marathon
Sensu
---
team: nhandler
page: true
notification_email: nhandler+devops@yelp.com
51
$ cat monitoring.yaml
52
● More advanced decision policies
● Infrastructure-Agnostic
● Better integration with PaaSTA/Mesos
Why not AWS (or something else)?
53
@YelpEngineering
fb.com/YelpEngineers
engineeringblog.yelp.com
github.com/yelp
54

Contenu connexe

Tendances

Lessons Learned From PayPal: Implementing Back-Pressure With Akka Streams And...
Lessons Learned From PayPal: Implementing Back-Pressure With Akka Streams And...Lessons Learned From PayPal: Implementing Back-Pressure With Akka Streams And...
Lessons Learned From PayPal: Implementing Back-Pressure With Akka Streams And...Lightbend
 
February 2016 HUG: Running Spark Clusters in Containers with Docker
February 2016 HUG: Running Spark Clusters in Containers with DockerFebruary 2016 HUG: Running Spark Clusters in Containers with Docker
February 2016 HUG: Running Spark Clusters in Containers with DockerYahoo Developer Network
 
April 2016 HUG: The latest of Apache Hadoop YARN and running your docker apps...
April 2016 HUG: The latest of Apache Hadoop YARN and running your docker apps...April 2016 HUG: The latest of Apache Hadoop YARN and running your docker apps...
April 2016 HUG: The latest of Apache Hadoop YARN and running your docker apps...Yahoo Developer Network
 
Real-Time Distributed and Reactive Systems with Apache Kafka and Apache Accumulo
Real-Time Distributed and Reactive Systems with Apache Kafka and Apache AccumuloReal-Time Distributed and Reactive Systems with Apache Kafka and Apache Accumulo
Real-Time Distributed and Reactive Systems with Apache Kafka and Apache AccumuloJoe Stein
 
Scylla Summit 2016: Outbrain Case Study - Lowering Latency While Doing 20X IO...
Scylla Summit 2016: Outbrain Case Study - Lowering Latency While Doing 20X IO...Scylla Summit 2016: Outbrain Case Study - Lowering Latency While Doing 20X IO...
Scylla Summit 2016: Outbrain Case Study - Lowering Latency While Doing 20X IO...ScyllaDB
 
Running Spark Inside Containers with Haohai Ma and Khalid Ahmed
Running Spark Inside Containers with Haohai Ma and Khalid Ahmed Running Spark Inside Containers with Haohai Ma and Khalid Ahmed
Running Spark Inside Containers with Haohai Ma and Khalid Ahmed Spark Summit
 
RENCI User Group Meeting 2017 - I Upgraded iRODS and I still have all my hair
RENCI User Group Meeting 2017 - I Upgraded iRODS and I still have all my hairRENCI User Group Meeting 2017 - I Upgraded iRODS and I still have all my hair
RENCI User Group Meeting 2017 - I Upgraded iRODS and I still have all my hairJohn Constable
 
Lessons Learned From Running Spark On Docker
Lessons Learned From Running Spark On DockerLessons Learned From Running Spark On Docker
Lessons Learned From Running Spark On DockerSpark Summit
 
Near-realtime analytics with Kafka and HBase
Near-realtime analytics with Kafka and HBaseNear-realtime analytics with Kafka and HBase
Near-realtime analytics with Kafka and HBasedave_revell
 
Spark on Kubernetes - Advanced Spark and Tensorflow Meetup - Jan 19 2017 - An...
Spark on Kubernetes - Advanced Spark and Tensorflow Meetup - Jan 19 2017 - An...Spark on Kubernetes - Advanced Spark and Tensorflow Meetup - Jan 19 2017 - An...
Spark on Kubernetes - Advanced Spark and Tensorflow Meetup - Jan 19 2017 - An...Chris Fregly
 
Streaming Processing with a Distributed Commit Log
Streaming Processing with a Distributed Commit LogStreaming Processing with a Distributed Commit Log
Streaming Processing with a Distributed Commit LogJoe Stein
 
Zoo keeper in the wild
Zoo keeper in the wildZoo keeper in the wild
Zoo keeper in the wilddatamantra
 
Actor-based concurrency in a modern Java Enterprise
Actor-based concurrency in a modern Java EnterpriseActor-based concurrency in a modern Java Enterprise
Actor-based concurrency in a modern Java EnterpriseAlexander Lukyanchikov
 
Getting Started with Apache Cassandra and Apache Zeppelin (DuyHai DOAN, DataS...
Getting Started with Apache Cassandra and Apache Zeppelin (DuyHai DOAN, DataS...Getting Started with Apache Cassandra and Apache Zeppelin (DuyHai DOAN, DataS...
Getting Started with Apache Cassandra and Apache Zeppelin (DuyHai DOAN, DataS...DataStax
 
Deploying and managing SolrCloud in the cloud using the Solr Scale Toolkit
Deploying and managing SolrCloud in the cloud using the Solr Scale ToolkitDeploying and managing SolrCloud in the cloud using the Solr Scale Toolkit
Deploying and managing SolrCloud in the cloud using the Solr Scale Toolkitthelabdude
 
Akka 2.4 plus commercial features in Typesafe Reactive Platform
Akka 2.4 plus commercial features in Typesafe Reactive PlatformAkka 2.4 plus commercial features in Typesafe Reactive Platform
Akka 2.4 plus commercial features in Typesafe Reactive PlatformLegacy Typesafe (now Lightbend)
 
Performance Monitoring: Understanding Your Scylla Cluster
Performance Monitoring: Understanding Your Scylla ClusterPerformance Monitoring: Understanding Your Scylla Cluster
Performance Monitoring: Understanding Your Scylla ClusterScyllaDB
 
Cassandra on Docker @ Walmart Labs
Cassandra on Docker @ Walmart LabsCassandra on Docker @ Walmart Labs
Cassandra on Docker @ Walmart LabsDataStax Academy
 
OpenStack High Availability
OpenStack High AvailabilityOpenStack High Availability
OpenStack High AvailabilityJakub Pavlik
 

Tendances (20)

Lessons Learned From PayPal: Implementing Back-Pressure With Akka Streams And...
Lessons Learned From PayPal: Implementing Back-Pressure With Akka Streams And...Lessons Learned From PayPal: Implementing Back-Pressure With Akka Streams And...
Lessons Learned From PayPal: Implementing Back-Pressure With Akka Streams And...
 
February 2016 HUG: Running Spark Clusters in Containers with Docker
February 2016 HUG: Running Spark Clusters in Containers with DockerFebruary 2016 HUG: Running Spark Clusters in Containers with Docker
February 2016 HUG: Running Spark Clusters in Containers with Docker
 
April 2016 HUG: The latest of Apache Hadoop YARN and running your docker apps...
April 2016 HUG: The latest of Apache Hadoop YARN and running your docker apps...April 2016 HUG: The latest of Apache Hadoop YARN and running your docker apps...
April 2016 HUG: The latest of Apache Hadoop YARN and running your docker apps...
 
Real-Time Distributed and Reactive Systems with Apache Kafka and Apache Accumulo
Real-Time Distributed and Reactive Systems with Apache Kafka and Apache AccumuloReal-Time Distributed and Reactive Systems with Apache Kafka and Apache Accumulo
Real-Time Distributed and Reactive Systems with Apache Kafka and Apache Accumulo
 
Scylla Summit 2016: Outbrain Case Study - Lowering Latency While Doing 20X IO...
Scylla Summit 2016: Outbrain Case Study - Lowering Latency While Doing 20X IO...Scylla Summit 2016: Outbrain Case Study - Lowering Latency While Doing 20X IO...
Scylla Summit 2016: Outbrain Case Study - Lowering Latency While Doing 20X IO...
 
Running Spark Inside Containers with Haohai Ma and Khalid Ahmed
Running Spark Inside Containers with Haohai Ma and Khalid Ahmed Running Spark Inside Containers with Haohai Ma and Khalid Ahmed
Running Spark Inside Containers with Haohai Ma and Khalid Ahmed
 
spark-kafka_mod
spark-kafka_modspark-kafka_mod
spark-kafka_mod
 
RENCI User Group Meeting 2017 - I Upgraded iRODS and I still have all my hair
RENCI User Group Meeting 2017 - I Upgraded iRODS and I still have all my hairRENCI User Group Meeting 2017 - I Upgraded iRODS and I still have all my hair
RENCI User Group Meeting 2017 - I Upgraded iRODS and I still have all my hair
 
Lessons Learned From Running Spark On Docker
Lessons Learned From Running Spark On DockerLessons Learned From Running Spark On Docker
Lessons Learned From Running Spark On Docker
 
Near-realtime analytics with Kafka and HBase
Near-realtime analytics with Kafka and HBaseNear-realtime analytics with Kafka and HBase
Near-realtime analytics with Kafka and HBase
 
Spark on Kubernetes - Advanced Spark and Tensorflow Meetup - Jan 19 2017 - An...
Spark on Kubernetes - Advanced Spark and Tensorflow Meetup - Jan 19 2017 - An...Spark on Kubernetes - Advanced Spark and Tensorflow Meetup - Jan 19 2017 - An...
Spark on Kubernetes - Advanced Spark and Tensorflow Meetup - Jan 19 2017 - An...
 
Streaming Processing with a Distributed Commit Log
Streaming Processing with a Distributed Commit LogStreaming Processing with a Distributed Commit Log
Streaming Processing with a Distributed Commit Log
 
Zoo keeper in the wild
Zoo keeper in the wildZoo keeper in the wild
Zoo keeper in the wild
 
Actor-based concurrency in a modern Java Enterprise
Actor-based concurrency in a modern Java EnterpriseActor-based concurrency in a modern Java Enterprise
Actor-based concurrency in a modern Java Enterprise
 
Getting Started with Apache Cassandra and Apache Zeppelin (DuyHai DOAN, DataS...
Getting Started with Apache Cassandra and Apache Zeppelin (DuyHai DOAN, DataS...Getting Started with Apache Cassandra and Apache Zeppelin (DuyHai DOAN, DataS...
Getting Started with Apache Cassandra and Apache Zeppelin (DuyHai DOAN, DataS...
 
Deploying and managing SolrCloud in the cloud using the Solr Scale Toolkit
Deploying and managing SolrCloud in the cloud using the Solr Scale ToolkitDeploying and managing SolrCloud in the cloud using the Solr Scale Toolkit
Deploying and managing SolrCloud in the cloud using the Solr Scale Toolkit
 
Akka 2.4 plus commercial features in Typesafe Reactive Platform
Akka 2.4 plus commercial features in Typesafe Reactive PlatformAkka 2.4 plus commercial features in Typesafe Reactive Platform
Akka 2.4 plus commercial features in Typesafe Reactive Platform
 
Performance Monitoring: Understanding Your Scylla Cluster
Performance Monitoring: Understanding Your Scylla ClusterPerformance Monitoring: Understanding Your Scylla Cluster
Performance Monitoring: Understanding Your Scylla Cluster
 
Cassandra on Docker @ Walmart Labs
Cassandra on Docker @ Walmart LabsCassandra on Docker @ Walmart Labs
Cassandra on Docker @ Walmart Labs
 
OpenStack High Availability
OpenStack High AvailabilityOpenStack High Availability
OpenStack High Availability
 

En vedette

09 espiritu santo y la iglesia
09 espiritu santo y la iglesia09 espiritu santo y la iglesia
09 espiritu santo y la iglesiachucho1943
 
Be the Change: Renovating professional development
Be the Change: Renovating professional developmentBe the Change: Renovating professional development
Be the Change: Renovating professional developmentTyna Williams
 
S&P Broadcasting
S&P BroadcastingS&P Broadcasting
S&P BroadcastingJan Brychta
 
Grupos funcionales
 Grupos funcionales Grupos funcionales
Grupos funcionalesABAR_DONNA
 
How to Double Sales without Acquiring New Customers – Retention Marketing
How to Double Sales without Acquiring New Customers – Retention MarketingHow to Double Sales without Acquiring New Customers – Retention Marketing
How to Double Sales without Acquiring New Customers – Retention MarketingKunle Campbell
 
Lush - Building Authentic Customer Relationships
Lush - Building Authentic Customer RelationshipsLush - Building Authentic Customer Relationships
Lush - Building Authentic Customer RelationshipsPatrick Wojcik
 
Error correction 3 mon+wed c1.2
Error correction 3 mon+wed c1.2Error correction 3 mon+wed c1.2
Error correction 3 mon+wed c1.2jeanphilippeguy
 
Trabajo transmision
Trabajo transmisionTrabajo transmision
Trabajo transmisionsidiellopez
 
Proyectos informaticos
Proyectos informaticosProyectos informaticos
Proyectos informaticosadriana023
 
How are messaging apps reinventing social media?
How are messaging apps reinventing social media?How are messaging apps reinventing social media?
How are messaging apps reinventing social media?Drew Benvie
 
Presentación de roland
Presentación de rolandPresentación de roland
Presentación de rolandanyie gil
 
Columbus Bar Association - Common Ethics Mistake Law Firms Make When Marketin...
Columbus Bar Association - Common Ethics Mistake Law Firms Make When Marketin...Columbus Bar Association - Common Ethics Mistake Law Firms Make When Marketin...
Columbus Bar Association - Common Ethics Mistake Law Firms Make When Marketin...Get Noticed Get Found
 

En vedette (15)

09 espiritu santo y la iglesia
09 espiritu santo y la iglesia09 espiritu santo y la iglesia
09 espiritu santo y la iglesia
 
Circuitos rlc (1)
Circuitos rlc (1)Circuitos rlc (1)
Circuitos rlc (1)
 
Be the Change: Renovating professional development
Be the Change: Renovating professional developmentBe the Change: Renovating professional development
Be the Change: Renovating professional development
 
S&P Broadcasting
S&P BroadcastingS&P Broadcasting
S&P Broadcasting
 
мо для пдф помірники
 мо для пдф помірники мо для пдф помірники
мо для пдф помірники
 
Grupos funcionales
 Grupos funcionales Grupos funcionales
Grupos funcionales
 
How to Double Sales without Acquiring New Customers – Retention Marketing
How to Double Sales without Acquiring New Customers – Retention MarketingHow to Double Sales without Acquiring New Customers – Retention Marketing
How to Double Sales without Acquiring New Customers – Retention Marketing
 
Gdd 23 05
Gdd 23 05Gdd 23 05
Gdd 23 05
 
Lush - Building Authentic Customer Relationships
Lush - Building Authentic Customer RelationshipsLush - Building Authentic Customer Relationships
Lush - Building Authentic Customer Relationships
 
Error correction 3 mon+wed c1.2
Error correction 3 mon+wed c1.2Error correction 3 mon+wed c1.2
Error correction 3 mon+wed c1.2
 
Trabajo transmision
Trabajo transmisionTrabajo transmision
Trabajo transmision
 
Proyectos informaticos
Proyectos informaticosProyectos informaticos
Proyectos informaticos
 
How are messaging apps reinventing social media?
How are messaging apps reinventing social media?How are messaging apps reinventing social media?
How are messaging apps reinventing social media?
 
Presentación de roland
Presentación de rolandPresentación de roland
Presentación de roland
 
Columbus Bar Association - Common Ethics Mistake Law Firms Make When Marketin...
Columbus Bar Association - Common Ethics Mistake Law Firms Make When Marketin...Columbus Bar Association - Common Ethics Mistake Law Firms Make When Marketin...
Columbus Bar Association - Common Ethics Mistake Law Firms Make When Marketin...
 

Similaire à PaaSTA Autoscaling at Yelp

PaaSTA: Running applications at Yelp
PaaSTA: Running applications at YelpPaaSTA: Running applications at Yelp
PaaSTA: Running applications at YelpNathan Handler
 
Apache Druid Auto Scale-out/in for Streaming Data Ingestion on Kubernetes
Apache Druid Auto Scale-out/in for Streaming Data Ingestion on KubernetesApache Druid Auto Scale-out/in for Streaming Data Ingestion on Kubernetes
Apache Druid Auto Scale-out/in for Streaming Data Ingestion on KubernetesDataWorks Summit
 
What's New in Docker - February 2017
What's New in Docker - February 2017What's New in Docker - February 2017
What's New in Docker - February 2017Patrick Chanezon
 
Introduction to kubernetes
Introduction to kubernetesIntroduction to kubernetes
Introduction to kubernetesRishabh Indoria
 
Monitoring in Motion: Monitoring Containers and Amazon ECS
Monitoring in Motion: Monitoring Containers and Amazon ECSMonitoring in Motion: Monitoring Containers and Amazon ECS
Monitoring in Motion: Monitoring Containers and Amazon ECSAmazon Web Services
 
Kubernetes #1 intro
Kubernetes #1   introKubernetes #1   intro
Kubernetes #1 introTerry Cho
 
Kubernetes for java developers - Tutorial at Oracle Code One 2018
Kubernetes for java developers - Tutorial at Oracle Code One 2018Kubernetes for java developers - Tutorial at Oracle Code One 2018
Kubernetes for java developers - Tutorial at Oracle Code One 2018Anthony Dahanne
 
Kubernetes Navigation Stories – DevOpsStage 2019, Kyiv
Kubernetes Navigation Stories – DevOpsStage 2019, KyivKubernetes Navigation Stories – DevOpsStage 2019, Kyiv
Kubernetes Navigation Stories – DevOpsStage 2019, KyivAleksey Asiutin
 
Testing kubernetes and_open_shift_at_scale_20170209
Testing kubernetes and_open_shift_at_scale_20170209Testing kubernetes and_open_shift_at_scale_20170209
Testing kubernetes and_open_shift_at_scale_20170209mffiedler
 
Monitoring at/with SUSE 2015
Monitoring at/with SUSE 2015Monitoring at/with SUSE 2015
Monitoring at/with SUSE 2015Lars Vogdt
 
Prometheus and Docker (Docker Galway, November 2015)
Prometheus and Docker (Docker Galway, November 2015)Prometheus and Docker (Docker Galway, November 2015)
Prometheus and Docker (Docker Galway, November 2015)Brian Brazil
 
NGINX Installation and Tuning
NGINX Installation and TuningNGINX Installation and Tuning
NGINX Installation and TuningNGINX, Inc.
 
SCM Puppet: from an intro to the scaling
SCM Puppet: from an intro to the scalingSCM Puppet: from an intro to the scaling
SCM Puppet: from an intro to the scalingStanislav Osipov
 
Scaling Up Logging and Metrics
Scaling Up Logging and MetricsScaling Up Logging and Metrics
Scaling Up Logging and MetricsRicardo Lourenço
 
What's new in Docker - InfraKit - Docker Meetup Berlin 2016
What's new in Docker - InfraKit - Docker Meetup Berlin 2016What's new in Docker - InfraKit - Docker Meetup Berlin 2016
What's new in Docker - InfraKit - Docker Meetup Berlin 2016Patrick Chanezon
 
What's new in NGINX Plus R19
What's new in NGINX Plus R19What's new in NGINX Plus R19
What's new in NGINX Plus R19NGINX, Inc.
 
Docker Swarm and Traefik 2.0
Docker Swarm and Traefik 2.0Docker Swarm and Traefik 2.0
Docker Swarm and Traefik 2.0Jakub Hajek
 
Oscon London 2016 - Docker from Development to Production
Oscon London 2016 - Docker from Development to ProductionOscon London 2016 - Docker from Development to Production
Oscon London 2016 - Docker from Development to ProductionPatrick Chanezon
 
OSDC 2018 | Highly Available Cloud Foundry on Kubernetes by Cornelius Schumacher
OSDC 2018 | Highly Available Cloud Foundry on Kubernetes by Cornelius SchumacherOSDC 2018 | Highly Available Cloud Foundry on Kubernetes by Cornelius Schumacher
OSDC 2018 | Highly Available Cloud Foundry on Kubernetes by Cornelius SchumacherNETWAYS
 

Similaire à PaaSTA Autoscaling at Yelp (20)

PaaSTA: Running applications at Yelp
PaaSTA: Running applications at YelpPaaSTA: Running applications at Yelp
PaaSTA: Running applications at Yelp
 
Apache Druid Auto Scale-out/in for Streaming Data Ingestion on Kubernetes
Apache Druid Auto Scale-out/in for Streaming Data Ingestion on KubernetesApache Druid Auto Scale-out/in for Streaming Data Ingestion on Kubernetes
Apache Druid Auto Scale-out/in for Streaming Data Ingestion on Kubernetes
 
Docker Monitoring Webinar
Docker Monitoring  WebinarDocker Monitoring  Webinar
Docker Monitoring Webinar
 
What's New in Docker - February 2017
What's New in Docker - February 2017What's New in Docker - February 2017
What's New in Docker - February 2017
 
Introduction to kubernetes
Introduction to kubernetesIntroduction to kubernetes
Introduction to kubernetes
 
Monitoring in Motion: Monitoring Containers and Amazon ECS
Monitoring in Motion: Monitoring Containers and Amazon ECSMonitoring in Motion: Monitoring Containers and Amazon ECS
Monitoring in Motion: Monitoring Containers and Amazon ECS
 
Kubernetes #1 intro
Kubernetes #1   introKubernetes #1   intro
Kubernetes #1 intro
 
Kubernetes for java developers - Tutorial at Oracle Code One 2018
Kubernetes for java developers - Tutorial at Oracle Code One 2018Kubernetes for java developers - Tutorial at Oracle Code One 2018
Kubernetes for java developers - Tutorial at Oracle Code One 2018
 
Kubernetes Navigation Stories – DevOpsStage 2019, Kyiv
Kubernetes Navigation Stories – DevOpsStage 2019, KyivKubernetes Navigation Stories – DevOpsStage 2019, Kyiv
Kubernetes Navigation Stories – DevOpsStage 2019, Kyiv
 
Testing kubernetes and_open_shift_at_scale_20170209
Testing kubernetes and_open_shift_at_scale_20170209Testing kubernetes and_open_shift_at_scale_20170209
Testing kubernetes and_open_shift_at_scale_20170209
 
Monitoring at/with SUSE 2015
Monitoring at/with SUSE 2015Monitoring at/with SUSE 2015
Monitoring at/with SUSE 2015
 
Prometheus and Docker (Docker Galway, November 2015)
Prometheus and Docker (Docker Galway, November 2015)Prometheus and Docker (Docker Galway, November 2015)
Prometheus and Docker (Docker Galway, November 2015)
 
NGINX Installation and Tuning
NGINX Installation and TuningNGINX Installation and Tuning
NGINX Installation and Tuning
 
SCM Puppet: from an intro to the scaling
SCM Puppet: from an intro to the scalingSCM Puppet: from an intro to the scaling
SCM Puppet: from an intro to the scaling
 
Scaling Up Logging and Metrics
Scaling Up Logging and MetricsScaling Up Logging and Metrics
Scaling Up Logging and Metrics
 
What's new in Docker - InfraKit - Docker Meetup Berlin 2016
What's new in Docker - InfraKit - Docker Meetup Berlin 2016What's new in Docker - InfraKit - Docker Meetup Berlin 2016
What's new in Docker - InfraKit - Docker Meetup Berlin 2016
 
What's new in NGINX Plus R19
What's new in NGINX Plus R19What's new in NGINX Plus R19
What's new in NGINX Plus R19
 
Docker Swarm and Traefik 2.0
Docker Swarm and Traefik 2.0Docker Swarm and Traefik 2.0
Docker Swarm and Traefik 2.0
 
Oscon London 2016 - Docker from Development to Production
Oscon London 2016 - Docker from Development to ProductionOscon London 2016 - Docker from Development to Production
Oscon London 2016 - Docker from Development to Production
 
OSDC 2018 | Highly Available Cloud Foundry on Kubernetes by Cornelius Schumacher
OSDC 2018 | Highly Available Cloud Foundry on Kubernetes by Cornelius SchumacherOSDC 2018 | Highly Available Cloud Foundry on Kubernetes by Cornelius Schumacher
OSDC 2018 | Highly Available Cloud Foundry on Kubernetes by Cornelius Schumacher
 

Dernier

Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DaySri Ambati
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 

Dernier (20)

Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 

PaaSTA Autoscaling at Yelp

  • 1. Nathan Handler nhandler@yelp.com / @nathanhandler PaaSTA Autoscaling at Yelp
  • 2. ● Nathan Handler / @nathanhandler ● Site Reliability Engineer at Yelp ● PaaSTA Developer and Maintainer ● Ubuntu/Debian GNU/Linux Developer ● freenode IRC staff member Who am I? 2
  • 3. Yelp’s Mission Connecting people with great local businesses. 3
  • 4. Yelp Stats As of Q3 2016 97M 3274%115M
  • 5. ● Monolithic Python application (~3M LoC) ● Builds/deployments took a long time ○ Bottleneck on how often we can deploy ● Mistakes are painful ○ Large impact ○ Difficult to find ○ Slow to fix History 5
  • 6. ● Split features into different applications ● Smaller services allowed for faster pushes ● Easier to reason about issues ● Able to scale services independently Service Oriented Architecture v1 6
  • 7. ● Standalone application ● Stateless ● Separate git repository ● Typically at Yelp: ○ HTTP API ○ Python, Pyramid, uWSGI ○ virtualenv What is a service? 7
  • 8. ● Statically defined list of hosts to deploy a service on ● Operations decides which hosts to deploy to ● Monitoring manually configured in Nagios ● Manual deployment system via rsync Deploying Services v1 8
  • 11. ● Yelp's Platform as a Service ● Builds, Deploys, Connects, and Monitors services ● Glue around existing and established open source tools PaaSTA 11 https://github.com/yelp/paasta #paasta on irc.freenode.net
  • 12. 12
  • 13. PaaSTA Components 13 Docker Registry Developer git push git pull git push docker push 13 Marathon Sensu
  • 15. . ├── Dockerfile ├── htdocs │ ├── index.php │ └── status └── Makefile 15 A simple service
  • 16. DOCKER_TAG ?= $(USER)-dev test: @echo 'Unit testing' itest: cook-image paasta local-run --healthcheck --service devops cook-image: docker build -t $(DOCKER_TAG) . 16 $ cat Makefile
  • 17. DOCKER_TAG ?= $(USER)-dev test: @echo 'Unit testing' itest: cook-image paasta local-run --healthcheck --service devops cook-image: docker build -t $(DOCKER_TAG) . 17 $ cat Makefile
  • 18. Containers: like lightweight VMs Provides a language (Dockerfile) for describing container image Reproducible builds (mostly) Provides software flexibility 18 Docker docker.com
  • 19. FROM ubuntu:xenial MAINTAINER Nathan Handler <nhandler@yelp.com> RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -y install apache2 libapache2-mod-php ENV APACHE_RUN_USER www-data ENV APACHE_RUN_GROUP www-data ENV APACHE_LOG_DIR /var/log/apache2 ENV APACHE_LOCK_DIR /var/lock/apache2 ENV APACHE_PID_FILE /var/run/apache2.pid RUN rm -f /var/www/html/index.html COPY htdocs /var/www/html/ CMD ["/usr/sbin/apache2", "-D", "FOREGROUND", "-C", "listen 8888"] EXPOSE 8888 19 $ cat Dockerfile
  • 20. ✓ yelpsoa-config directory for devops found in /nail/etc/serv ✓ deploy.yaml exists for a Jenkins pipeline ✗ No 'security-check' entry was found in your deploy.yaml. Please add a security-check entry *AFTER* the itest entry in d so your docker image can be checked against known security vul More info: http://servicedocs.yelpcorp.com/docs/paasta_tools/c ✗ No 'performance-check' entry was found in your deploy.yaml. Please add a performance-check entry *AFTER* the security-chec so your docker image can be checked for performance regression More info: http://servicedocs.yelpcorp.com/docs/paasta_tools/c ✓ Jenkins build pipeline found ✓ Git repo found in the expected location. ✓ Found Dockerfile ✓ A Makefile is present ✓ The Makefile contains a tab character ✓ The Makefile contains a docker tag ✓ The Makefile responds to `make cook-image` ✓ The Makefile responds to `make itest` ✓ The Makefile responds to `make test` ✓ Found marathon.yaml file. ✓ All entries in deploy.yaml correspond to a marathon or chro ✓ All marathon instances have a corresponding deploy.yaml ent ✓ monitoring.yaml found for Sensu monitoring ✓ Your service uses Sensu and team 'nhandler' will get alerts ✓ Found smartstack.yaml file ✓ Instance 'demo' of your service is using smartstack port 20 balanced ✓ Successfully validated schema: marathon-nova-devc.yaml 20 $ paasta check
  • 22. --- pipeline: - instancename: itest - instancename: push-to-registry - instancename: dev.everything 22 $ cat deploy.yaml
  • 25. Describe end goal, not path Helps us achieve fault tolerance. "Deploy 6de16ff2 to prod" vs. "Commit 6de16ff2 should be running in prod" Gas pedal vs. Cruise Control 25 Declarative control
  • 26. Description: A demo PaaSTA service for OSCON 2016 External Link: http://conferences.oreilly.com/oscon/open-source-us/public/schedule/detail/49358 Monitored By: team nhandler Runbook: Please set a `runbook` field in your monitoring.yaml. Like "y/rb-m Docs: https://trac.yelpcorp.com/wiki/HowToService/Monitoring/monitoring.yam Git Repo: git@git.yelpcorp.com:services/devops Jenkins Pipeline: https://jenkins.yelpcorp.com/view/services-devops Deployed to the following clusters: - nova-devc (N/A) Smartstack endpoint(s): - http://169.254.255.254:20973 (demo) Dashboard(s): - https://uchiwa.yelpcorp.com/#/events?q=devops (Sensu Alerts) 26 $ paasta info
  • 27. PaaSTA Components 27 Docker Registry Developer git push git pull git push docker push 27 Marathon
  • 28. Mesos is an "SDK for distributed systems", not batteries-included. Requires a framework • Marathon • Chronos Can run many frameworks on the same cluster Supports Docker as task executor 28 mesosphere.io mesos.apache.org Scheduling: Mesos + Marathon
  • 29. --- main: cpus: 0.1 instances: 3 mem: 500 29 $ cat marathon-nova-devc.yaml
  • 30. PaaSTA Components 30 Docker Registry Developer git push git pull git push docker push 30 Marathon
  • 31. ● Brutal: Stops old versions and starts the new version, without regard to safety. ● Upthendown: Brings up the new version of the service and waits until all instances are healthy before stopping the old versions. ● Downthenup: Stops any old versions and waits for them to die before starting the new version. ● Crossover: Starts the new version, and gradually kills instances of the old versions as new instances become healthy. Bounce Strategies 31
  • 32. 32 Discovery in PaaSTA: Smartstack mesos slave box2 client nerve HAProxy synapse box1 service nerve mesos slave synapse HAProxy ZooKeeperMetadata HTTP request healthcheck
  • 35. ● Reduce/Eliminate Manual Scaling ● Stop Overprovisioning ● Save Money on our Infrastructure Bill ● Increase Reliability Why Autoscale? 35
  • 36. Pipeline: https://jenkins.yelpcorp.com/view/services-devops cluster: nova-devc instance: demo Git sha: 6de16ff2 State: Running - Desired state: Started Marathon: Healthy - up with (3/3) instances. Status: Running. Mesos: Healthy - (3/3) tasks in the TASK_RUNNING state. Smartstack: Name LastCheck LastChange Status useast1-devc - Healthy - in haproxy with (3/3) total backends UP in this namespace. 36 $ paasta status
  • 38. --- main: cpus: 0.1 instances: 3 mem: 500 38 $ cat marathon-nova-devc.yaml
  • 39. --- main: cpus: 0.1 min_instances: 3 max_instances: 5 mem: 500 39 $ cat marathon-nova-devc.yaml
  • 40. Autoscaling Should Be Flexible 40
  • 41. ● mesos_cpu: Tries to use CPU usage to predict when to autoscale (Default) ● http: Makes a request on a HTTP endpoint on your service. Expects a JSON-formatted dictionary with a 'utilization' field containing a number 0-1 ● uwsgi: Uses the percentage of non-idle workers as the utilization metric Metrics Providers 41
  • 42. ● pid: Uses a PID controller to determine when to autoscale a service ● threshold: Autoscales when a service’s utilization exceeds beyond a certain threshold. ● bespoke: Allows a service author to implement their own autoscaling. Decision Policies 42
  • 43. --- main: cpus: 0.1 min_instances: 3 max_instances: 12 mem: 500 autoscaling: metrics_provider: http endpoint: metrics.json decision_policy: threshold setpoint: 0.5 43 $ cat marathon-nova-devc.yaml
  • 45. ● Examines all resources tracked by PaaSTA ○ Scales based on the "worst" value ● Supports scaling pools independently ● Supports a configurable target_utilization ● Supports both ASGs and SFRs in AWS Cluster Autoscaler 45
  • 46. Cluster: mesosstage Dashboards: Marathon RO: http://marathon.paasta-mesosstage.yelp/ Smartstack: http://paasta-mesosstage.yelp:3212 Chronos RO: http://chronos.paasta-mesosstage.yelp/ Mesos: http://mesos.paasta-mesosstage.yelp Mesos Status: OK quorum: masters: 3 configured quorum: 2 frameworks: framework: chronos-2.4.0 count: 1 framework: marathon count: 1 CPUs: 1.00 / 7 in use (14.29%) Memory: 3.03 / 42.85GB in use (7.07%) Disk: 10.00 / 153.81GB in use (6.50%) tasks: running: 9 staging: 1 starting: 0 slaves: active: 7 inactive: 0 Marathon Status: OK marathon apps: 5 marathon tasks: 9 marathon deployments: 0 Chronos Status: OK Enabled chronos jobs: 1 46 $ paasta metastatus
  • 47. module "nova-devc-useast1a-demo" { source = ".../terraform-modules/paasta_spot_cluster" cluster = "nova-devc" ecosystem = "${var.ecosystem}" min_capacity = 2 max_capacity = 20 initial_target_capacity = 5 ami_type = "paasta" spot_price = 0.1337 instance_profile = "paasta" pool = "demo" } 47 Terraform'ed PaaSTA Pool
  • 48. ● Scaling up is safe and easy ● Scaling down can be risky Scaling Safely 48
  • 49. ● Utilizes Mesos Maintenance Primitives ● Attempts to dynamically reserve all available resources on a host ● Scales up the service by the number of instances running on the host that is in maintenance ● Terminates the host once it is fully drained or it reaches its timeout PaaSTA Maintenance 49
  • 50. PaaSTA Components 50 Docker Registry Developer git push git pull git push docker push 50 Marathon Sensu
  • 51. --- team: nhandler page: true notification_email: nhandler+devops@yelp.com 51 $ cat monitoring.yaml
  • 52. 52
  • 53. ● More advanced decision policies ● Infrastructure-Agnostic ● Better integration with PaaSTA/Mesos Why not AWS (or something else)? 53