SlideShare uma empresa Scribd logo
1 de 42
Baixar para ler offline
Building a smarter application stack
Tomas	
  Doran	
  
@bobtfish	
  
2014-­‐06-­‐10
Docker is the future
• Preaching to the converted here ;)

• Game changing technology

• No silver bullets (ever)
• Introduces it’s own set of problems and issues
• Dependency discovery / wiring
• Scheduling
2
Smartstack
• One possible solution to discovery
problems

• This talk:
• Application architecture
• Problem(s) we’re solving
• Why this solution works well for us
• Alternate solutions
3
Microservices - also the future!
• The same as SOA
• But one API per service.
• Own data store!

• Lots of services (dozens, maybe 100s)

• All individually very simple
• Easy to reason about.
• Easy to replace
4
Don’t break the site - ever!!!
• Microservices are individually deployable!
• When we say “Don’t break the site”
• We mean
• Don’t break all of the site!
5
Don’t break the site - ever!!!
• If you have graceful degradation…
• You can ignore MTBF in the backend services!
• You only care about MTTR.
6
“I’ll just break this out into it’s own
application, as it’ll be easier to
maintain in 10 years time”
- Pre seed funding
nobody, ever!
7
Monolith - the reality
• Everyone has one of these :)
• If you’re far enough down the path, you call
this ‘The presentation layer’.

• Still poses a challenge
• need async requests
• need graceful degradation
8
Monolith - the reality
• Most popular service

• Most dependencies
• Call into 10s or 100s of other services in a
request!

• Needs circuit breakers + dynamic
configuration
9
No silver bullet = No one solution
• You should always have 2.
• Nagios / Sensu
• RRDs + Ganglia / Graphite + Diamond
• YAML files / Zookeeper
10
No silver bullet = No one solution
• ‘Top down’ architecture sucks.
• Instead, broad goals + ’Bottom up’ architecture
• Internal competition!
• Replacing the incumbent solution happens
organically
• If your thing works better, people will want to
move! 

• Not perfect! Better than top-down!
11
“Humans are bad at predicting the performance of
complex systems […]. Our ability to create large
and complex systems fools us into believing that
we’re also entitled to understand them”

- Carlos Bueno “Mature optimization handbook”

12
Distributed complexity
• Distributed systems introduce their own set of complexity
• Reasoning about the whole system challenging
• Timing/profiling/performance analysis non-trivial
• Resource scheduling also non-trivial
• 2nd order effects
!
• Can’t reason about emergent behavior
13
14
15
?
16
?
What the heck happened at 16:46?
17
?
And why did it stop at 17:00?
Dynamic architecture
• Cattle not pets
• AWS and VMs in ‘the cloud’ started this
• Docker takes it a step further

• Explicitly manage persistent state
• Explicit regular recycling
• All updates are redeploys

18
Dependency nightmares
• Almost everything has some dependencies
• Simple example, web app with a mysql DB
• App config in a YAML file

• Mysql container address changes when you restart mysql!
• Oops, app can’t find mysql!

• Do I need to restart every application using mysql?
• Sucks!
• Do I need to rebuild application containers using mysql?
• To edit the config YAML file!
• Super super sucks! 19
Runtime wiring
• mysql failovers - the simple case!

• Presentation layer talking to service REST layers
• Different deployment schedules
• No downtime

• Only possible solution: wiring dependencies at runtime
• A challenge
• Also an opportunity

• DNS is workable in some cases
20
Dynamic discovery
• Discovery becomes a core problem

• DNS re-resolving not generally trustworthy
• You need to test everything for this

• DNS balancing (internally) is awful
• Failed node + multiple connections/requests
• DNS round robin
• Everything sees failure
• Slow to shift traffic
• Round robin is crappy for load balancing

21
Externalized wiring
• Remove a lot of complexity from the application domain

• Run a load balancer (haproxy) on each machine

• Applications always connect to load balancer on fixed
host/port
• localhost on traditional metal/VMs
• supplied by —link or environment variables in Docker

• Applications become wiring agnostic!
22
Externalized wiring
23
‘Client side load balancing’
• Lots of projects use this approach:
• Project Atomic
• Marathon + Mesos-Docker
• vulcand (https://github.com/mailgun/vulcand)
• Frontrunner (https://github.com/Wizcorp/
frontrunner)
• Consul
!
• Smartstack
24
Legacy infrastructure
• Physical machines
• Application images in AMIs
• kvm

• Can’t just use container links or a Docker only
solution

• Want to use the same (uniform) solution
everywhere.
25
Entropy reduction
• You can’t change everything at once!

• Everything will tend towards chaos
• ‘Old infrastructure’
• ‘New infrastructure’
• ‘New new infrastructure’
!
• Solution specifically chosen so it could be generic.
26
SmartStack
• 2 parts
• Synapse
• Nerve
!
• Conceptually simple
• Very flexible
• Easy to hack on
• Plays well on traditional machines
• Plays well in docker
27
Synapse
• Does discovery against a pluggable backend
• Writes out a haproxy configuration

• Assign a well known port to all services
• Application connects to that port
• haproxy forwards to an available backend

• Your application doesn’t need to know about discovery!

• Technology agnostic - works the same on metal/VMs/Docker
28
29
Why synapse?
• haproxy is a well known solution
• ruby - easy to modify
• simple (has one job)
• Pluggable - discovery with multiple methods:
• JSON config (static)
• zookeeper
• etcd
• docker API
• ec2 tags
• Flexible
• Deploy one per instance
• Or pairs as dedicated lbs 30
Nerve
• Health checks services
• Health checks are pluggable.
• HTTP (flexible) + mysql come out the box
• Registers service information to backend
• zookeeper
• etcd (beta)
31
32
Connector agnostic containers
• On ‘real servers’ or VMs, running a synapse
instance per box is fine.

• In docker, we want to abstract more than that
• Make containers connector agnostic!
• They don’t need to know or care
• Upgrade independently.
33
Synapse <3 ambassador
containers
• ‘Ambassador pattern’
• Run a synapse ‘ambassador’ container on each host
for each service
• Link each application to the ambassador for each of
it’s dependencies
• Environment variables to each service’s haproxy
• Separates synapse management (i.e. changing the
wiring) from application management (i.e.
upgrading the app version).
34
35
Container links
• Ambassador for service A presents:
• port 8000 for HTTP REST service
• port 8443 for HTTPS REST service
!
• Container linking to ambassador sees:
• SRVA_PORT_8000_TCP=tcp://172.17.0.8:6379
• SRVA_PORT_8000_TCP_PROTO=tcp
• SRVA_PORT_8000_TCP_ADDR=172.17.0.8
• SRVA_PORT_8000_TCP_PORT=6379
• SRVA_PORT_8443_TCP=tcp://172.17.0.8:6380
• SRVA_PORT_8443_TCP_PROTO=tcp
• SRVA_PORT_8443_TCP_ADDR=172.17.0.8
• SRVA_PORT_8443_TCP_PORT=6380
36
Nerve registration container
• Each app container gets a Nerve instance
• Nerve registers its 1 app
• Nerve instance can be generic
• Make services all have a standard /health
endpoint
• Healthchecks standard
• Only need one nerve container image!
37
Alternate options
• Just register the contents of the docker API into etcd
• http://coreos.com/blog/docker-dynamic-ambassador-
powered-by-etcd/
• No health checks
• Docker only
• confd
• Consul
• frontrunner - discovery from Marathon
• Uses haproxy too
• Less health checking options
38
Vulcand
39
Issues
• If you have lots of machines + services, you have a lot
of Synapses
• haproxy health checks can become expensive on
end user apps
• Nerve helps with this

• Lots of small load balancers is harder to reason about
than a few big ones
40
Live demo?
41
Thanks
• Slides will be online

http://slideshare.net/bobtfish

• Official Smartstack site:

http://nerds.airbnb.com/smartstack-service-discovery-cloud/

• Pre-built containers to play with + blog post

http://engineeringblog.yelp.com/

https://index.docker.io/u/bobtfish/synapse-etcd-amb/

https://index.docker.io/u/bobtfish/nerve-etcd/

• Questions?
42

Mais conteúdo relacionado

Mais procurados

Immutable infrastructure with Docker and EC2
Immutable infrastructure with Docker and EC2Immutable infrastructure with Docker and EC2
Immutable infrastructure with Docker and EC2dotCloud
 
Docker and Containers overview - Docker Workshop
Docker and Containers overview - Docker WorkshopDocker and Containers overview - Docker Workshop
Docker and Containers overview - Docker WorkshopJonas Rosland
 
Basic docker for developer
Basic docker for developerBasic docker for developer
Basic docker for developerWeerayut Hongsa
 
Docker HK Meetup - 201707
Docker HK Meetup - 201707Docker HK Meetup - 201707
Docker HK Meetup - 201707Clarence Ho
 
DockerCon EU 2015: Speed Up Deployment: Building a Distributed Docker Registr...
DockerCon EU 2015: Speed Up Deployment: Building a Distributed Docker Registr...DockerCon EU 2015: Speed Up Deployment: Building a Distributed Docker Registr...
DockerCon EU 2015: Speed Up Deployment: Building a Distributed Docker Registr...Docker, Inc.
 
Docker Introduction
Docker IntroductionDocker Introduction
Docker IntroductionHao Fan
 
Write Once and REALLY Run Anywhere | OpenStack Summit HK 2013
Write Once and REALLY Run Anywhere | OpenStack Summit HK 2013Write Once and REALLY Run Anywhere | OpenStack Summit HK 2013
Write Once and REALLY Run Anywhere | OpenStack Summit HK 2013dotCloud
 
DockerCon SF 2015: Keynote Day 1
DockerCon SF 2015: Keynote Day 1DockerCon SF 2015: Keynote Day 1
DockerCon SF 2015: Keynote Day 1Docker, Inc.
 
Docker Introduction
Docker IntroductionDocker Introduction
Docker IntroductionPeng Xiao
 
John Engates Keynote at Dockercon 14
John Engates Keynote at Dockercon 14John Engates Keynote at Dockercon 14
John Engates Keynote at Dockercon 14dotCloud
 
DCSF19 CMD and Conquer: Containerizing the Monolith
DCSF19 CMD and Conquer: Containerizing the Monolith  DCSF19 CMD and Conquer: Containerizing the Monolith
DCSF19 CMD and Conquer: Containerizing the Monolith Docker, Inc.
 
How we dockerized a startup? #meetup #docker
How we dockerized a startup? #meetup #docker How we dockerized a startup? #meetup #docker
How we dockerized a startup? #meetup #docker Jonathan Martin
 
OpenStack - Docker - Rackspace HQ
OpenStack - Docker - Rackspace HQOpenStack - Docker - Rackspace HQ
OpenStack - Docker - Rackspace HQdotCloud
 
Docker on Google App Engine
Docker on Google App EngineDocker on Google App Engine
Docker on Google App EngineDocker, Inc.
 
Microservices using relocatable Docker containers
Microservices using relocatable Docker containersMicroservices using relocatable Docker containers
Microservices using relocatable Docker containersMauricio Garavaglia
 
Docker and containers - For Boston Docker Meetup Workshop in March 2015
Docker and containers - For Boston Docker Meetup Workshop in March 2015Docker and containers - For Boston Docker Meetup Workshop in March 2015
Docker and containers - For Boston Docker Meetup Workshop in March 2015Jonas Rosland
 
Docker Container As A Service - March 2016
Docker Container As A Service - March 2016Docker Container As A Service - March 2016
Docker Container As A Service - March 2016Patrick Chanezon
 

Mais procurados (20)

Immutable infrastructure with Docker and EC2
Immutable infrastructure with Docker and EC2Immutable infrastructure with Docker and EC2
Immutable infrastructure with Docker and EC2
 
Docker and Containers overview - Docker Workshop
Docker and Containers overview - Docker WorkshopDocker and Containers overview - Docker Workshop
Docker and Containers overview - Docker Workshop
 
Basic docker for developer
Basic docker for developerBasic docker for developer
Basic docker for developer
 
Docker HK Meetup - 201707
Docker HK Meetup - 201707Docker HK Meetup - 201707
Docker HK Meetup - 201707
 
DockerCon EU 2015: Speed Up Deployment: Building a Distributed Docker Registr...
DockerCon EU 2015: Speed Up Deployment: Building a Distributed Docker Registr...DockerCon EU 2015: Speed Up Deployment: Building a Distributed Docker Registr...
DockerCon EU 2015: Speed Up Deployment: Building a Distributed Docker Registr...
 
Docker and stuff
Docker and stuffDocker and stuff
Docker and stuff
 
Docker Introduction
Docker IntroductionDocker Introduction
Docker Introduction
 
Write Once and REALLY Run Anywhere | OpenStack Summit HK 2013
Write Once and REALLY Run Anywhere | OpenStack Summit HK 2013Write Once and REALLY Run Anywhere | OpenStack Summit HK 2013
Write Once and REALLY Run Anywhere | OpenStack Summit HK 2013
 
DockerCon SF 2015: Keynote Day 1
DockerCon SF 2015: Keynote Day 1DockerCon SF 2015: Keynote Day 1
DockerCon SF 2015: Keynote Day 1
 
Docker Introduction
Docker IntroductionDocker Introduction
Docker Introduction
 
John Engates Keynote at Dockercon 14
John Engates Keynote at Dockercon 14John Engates Keynote at Dockercon 14
John Engates Keynote at Dockercon 14
 
Docker workshop
Docker workshopDocker workshop
Docker workshop
 
DCSF19 CMD and Conquer: Containerizing the Monolith
DCSF19 CMD and Conquer: Containerizing the Monolith  DCSF19 CMD and Conquer: Containerizing the Monolith
DCSF19 CMD and Conquer: Containerizing the Monolith
 
How we dockerized a startup? #meetup #docker
How we dockerized a startup? #meetup #docker How we dockerized a startup? #meetup #docker
How we dockerized a startup? #meetup #docker
 
7+1 myths of the new os
7+1 myths of the new os7+1 myths of the new os
7+1 myths of the new os
 
OpenStack - Docker - Rackspace HQ
OpenStack - Docker - Rackspace HQOpenStack - Docker - Rackspace HQ
OpenStack - Docker - Rackspace HQ
 
Docker on Google App Engine
Docker on Google App EngineDocker on Google App Engine
Docker on Google App Engine
 
Microservices using relocatable Docker containers
Microservices using relocatable Docker containersMicroservices using relocatable Docker containers
Microservices using relocatable Docker containers
 
Docker and containers - For Boston Docker Meetup Workshop in March 2015
Docker and containers - For Boston Docker Meetup Workshop in March 2015Docker and containers - For Boston Docker Meetup Workshop in March 2015
Docker and containers - For Boston Docker Meetup Workshop in March 2015
 
Docker Container As A Service - March 2016
Docker Container As A Service - March 2016Docker Container As A Service - March 2016
Docker Container As A Service - March 2016
 

Destaque

Docker introduction
Docker introductionDocker introduction
Docker introductiondotCloud
 
Introduction to dockerfile, SF Peninsula Software Development Meetup @Guidewire
Introduction to dockerfile, SF Peninsula Software Development Meetup @Guidewire Introduction to dockerfile, SF Peninsula Software Development Meetup @Guidewire
Introduction to dockerfile, SF Peninsula Software Development Meetup @Guidewire dotCloud
 
Wot2013云计算架构师峰会 -陈轶飞2
Wot2013云计算架构师峰会 -陈轶飞2Wot2013云计算架构师峰会 -陈轶飞2
Wot2013云计算架构师峰会 -陈轶飞2dotCloud
 
Dockerizing your applications - Docker workshop @Twitter
Dockerizing your applications - Docker workshop @TwitterDockerizing your applications - Docker workshop @Twitter
Dockerizing your applications - Docker workshop @TwitterdotCloud
 
Introduction to Docker - Docker workshop @Twitter
Introduction to Docker - Docker workshop @TwitterIntroduction to Docker - Docker workshop @Twitter
Introduction to Docker - Docker workshop @TwitterdotCloud
 
Scaling Traffic from 0 to 139 Million Unique Visitors
Scaling Traffic from 0 to 139 Million Unique VisitorsScaling Traffic from 0 to 139 Million Unique Visitors
Scaling Traffic from 0 to 139 Million Unique VisitorsYelp Engineering
 
"Using ElasticSearch to Scale Near Real-Time Search" by John Billings (Presen...
"Using ElasticSearch to Scale Near Real-Time Search" by John Billings (Presen..."Using ElasticSearch to Scale Near Real-Time Search" by John Billings (Presen...
"Using ElasticSearch to Scale Near Real-Time Search" by John Billings (Presen...Yelp Engineering
 
VMCS14 Pool Your REsources: Building Cross Sector Collaborations for High Impact
VMCS14 Pool Your REsources: Building Cross Sector Collaborations for High ImpactVMCS14 Pool Your REsources: Building Cross Sector Collaborations for High Impact
VMCS14 Pool Your REsources: Building Cross Sector Collaborations for High ImpactVolunteerMatch
 
Portfolio-Hany Tadross
Portfolio-Hany TadrossPortfolio-Hany Tadross
Portfolio-Hany TadrossHany Tadross
 
Energy Management in Water Supply Systems - Pradeep Kumar , Alliance to Save ...
Energy Management in Water Supply Systems - Pradeep Kumar , Alliance to Save ...Energy Management in Water Supply Systems - Pradeep Kumar , Alliance to Save ...
Energy Management in Water Supply Systems - Pradeep Kumar , Alliance to Save ...www.theurbanvision.com
 
ICAWC 2014 - Workshop - Shelter Building, Design For Daily Routines - Matt Ta...
ICAWC 2014 - Workshop - Shelter Building, Design For Daily Routines - Matt Ta...ICAWC 2014 - Workshop - Shelter Building, Design For Daily Routines - Matt Ta...
ICAWC 2014 - Workshop - Shelter Building, Design For Daily Routines - Matt Ta...Dogs Trust
 
MCMillan Custom Homes
MCMillan Custom HomesMCMillan Custom Homes
MCMillan Custom HomesMikeMcMillan3
 

Destaque (13)

Docker introduction
Docker introductionDocker introduction
Docker introduction
 
Introduction to dockerfile, SF Peninsula Software Development Meetup @Guidewire
Introduction to dockerfile, SF Peninsula Software Development Meetup @Guidewire Introduction to dockerfile, SF Peninsula Software Development Meetup @Guidewire
Introduction to dockerfile, SF Peninsula Software Development Meetup @Guidewire
 
Wot2013云计算架构师峰会 -陈轶飞2
Wot2013云计算架构师峰会 -陈轶飞2Wot2013云计算架构师峰会 -陈轶飞2
Wot2013云计算架构师峰会 -陈轶飞2
 
Dockerizing your applications - Docker workshop @Twitter
Dockerizing your applications - Docker workshop @TwitterDockerizing your applications - Docker workshop @Twitter
Dockerizing your applications - Docker workshop @Twitter
 
Introduction to Docker - Docker workshop @Twitter
Introduction to Docker - Docker workshop @TwitterIntroduction to Docker - Docker workshop @Twitter
Introduction to Docker - Docker workshop @Twitter
 
MySQL At Yelp
MySQL At YelpMySQL At Yelp
MySQL At Yelp
 
Scaling Traffic from 0 to 139 Million Unique Visitors
Scaling Traffic from 0 to 139 Million Unique VisitorsScaling Traffic from 0 to 139 Million Unique Visitors
Scaling Traffic from 0 to 139 Million Unique Visitors
 
"Using ElasticSearch to Scale Near Real-Time Search" by John Billings (Presen...
"Using ElasticSearch to Scale Near Real-Time Search" by John Billings (Presen..."Using ElasticSearch to Scale Near Real-Time Search" by John Billings (Presen...
"Using ElasticSearch to Scale Near Real-Time Search" by John Billings (Presen...
 
VMCS14 Pool Your REsources: Building Cross Sector Collaborations for High Impact
VMCS14 Pool Your REsources: Building Cross Sector Collaborations for High ImpactVMCS14 Pool Your REsources: Building Cross Sector Collaborations for High Impact
VMCS14 Pool Your REsources: Building Cross Sector Collaborations for High Impact
 
Portfolio-Hany Tadross
Portfolio-Hany TadrossPortfolio-Hany Tadross
Portfolio-Hany Tadross
 
Energy Management in Water Supply Systems - Pradeep Kumar , Alliance to Save ...
Energy Management in Water Supply Systems - Pradeep Kumar , Alliance to Save ...Energy Management in Water Supply Systems - Pradeep Kumar , Alliance to Save ...
Energy Management in Water Supply Systems - Pradeep Kumar , Alliance to Save ...
 
ICAWC 2014 - Workshop - Shelter Building, Design For Daily Routines - Matt Ta...
ICAWC 2014 - Workshop - Shelter Building, Design For Daily Routines - Matt Ta...ICAWC 2014 - Workshop - Shelter Building, Design For Daily Routines - Matt Ta...
ICAWC 2014 - Workshop - Shelter Building, Design For Daily Routines - Matt Ta...
 
MCMillan Custom Homes
MCMillan Custom HomesMCMillan Custom Homes
MCMillan Custom Homes
 

Semelhante a Building a smarter application Stack by Tomas Doran from Yelp

Microservices pros and cons dark
Microservices pros and cons darkMicroservices pros and cons dark
Microservices pros and cons darkAndrew Siemer
 
Microservices pros and cons - houston tech fest
Microservices pros and cons - houston tech festMicroservices pros and cons - houston tech fest
Microservices pros and cons - houston tech festAndrew Siemer
 
Jelastic - Containers Live Migration Behind the Scene
Jelastic - Containers Live Migration Behind the SceneJelastic - Containers Live Migration Behind the Scene
Jelastic - Containers Live Migration Behind the SceneJelastic Multi-Cloud PaaS
 
The impact of cloud NSBCon NY by Yves Goeleven
The impact of cloud NSBCon NY by Yves GoelevenThe impact of cloud NSBCon NY by Yves Goeleven
The impact of cloud NSBCon NY by Yves GoelevenParticular Software
 
PromCon EU 2022 - Centralized vs Decentralized Prometheus Scraping Architectu...
PromCon EU 2022 - Centralized vs Decentralized Prometheus Scraping Architectu...PromCon EU 2022 - Centralized vs Decentralized Prometheus Scraping Architectu...
PromCon EU 2022 - Centralized vs Decentralized Prometheus Scraping Architectu...Eric D. Schabell
 
The Need of Cloud-Native Application
The Need of Cloud-Native ApplicationThe Need of Cloud-Native Application
The Need of Cloud-Native ApplicationEmiliano Pecis
 
John adams talk cloudy
John adams   talk cloudyJohn adams   talk cloudy
John adams talk cloudyJohn Adams
 
Platform Clouds, Containers, Immutable Infrastructure Oh My!
Platform Clouds, Containers, Immutable Infrastructure Oh My!Platform Clouds, Containers, Immutable Infrastructure Oh My!
Platform Clouds, Containers, Immutable Infrastructure Oh My!Stuart Charlton
 
Latest (storage IO) patterns for cloud-native applications
Latest (storage IO) patterns for cloud-native applications Latest (storage IO) patterns for cloud-native applications
Latest (storage IO) patterns for cloud-native applications OpenEBS
 
Rami Sayar - Node microservices with Docker
Rami Sayar - Node microservices with DockerRami Sayar - Node microservices with Docker
Rami Sayar - Node microservices with DockerWeb à Québec
 
Scaling a MeteorJS SaaS app on AWS
Scaling a MeteorJS SaaS app on AWSScaling a MeteorJS SaaS app on AWS
Scaling a MeteorJS SaaS app on AWSBrett McLain
 
LASUG Online: Introduction to Docker and Docker Tools
LASUG Online: Introduction to Docker and Docker ToolsLASUG Online: Introduction to Docker and Docker Tools
LASUG Online: Introduction to Docker and Docker ToolsVasiliy Fomichev
 
To Build My Own Cloud with Blackjack…
To Build My Own Cloud with Blackjack…To Build My Own Cloud with Blackjack…
To Build My Own Cloud with Blackjack…Sergey Dzyuban
 
Digital Transformation with Kubernetes, Containers, and Microservices
Digital Transformation with Kubernetes, Containers, and MicroservicesDigital Transformation with Kubernetes, Containers, and Microservices
Digital Transformation with Kubernetes, Containers, and MicroservicesLightbend
 
FreeSWITCH as a Microservice
FreeSWITCH as a MicroserviceFreeSWITCH as a Microservice
FreeSWITCH as a MicroserviceEvan McGee
 
Deploying microservices on AWS
Deploying microservices on AWSDeploying microservices on AWS
Deploying microservices on AWSMichael Haberman
 
The Good, the Bad and the Ugly of Migrating Hundreds of Legacy Applications ...
 The Good, the Bad and the Ugly of Migrating Hundreds of Legacy Applications ... The Good, the Bad and the Ugly of Migrating Hundreds of Legacy Applications ...
The Good, the Bad and the Ugly of Migrating Hundreds of Legacy Applications ...Josef Adersberger
 
Migrating Hundreds of Legacy Applications to Kubernetes - The Good, the Bad, ...
Migrating Hundreds of Legacy Applications to Kubernetes - The Good, the Bad, ...Migrating Hundreds of Legacy Applications to Kubernetes - The Good, the Bad, ...
Migrating Hundreds of Legacy Applications to Kubernetes - The Good, the Bad, ...QAware GmbH
 

Semelhante a Building a smarter application Stack by Tomas Doran from Yelp (20)

Microservices pros and cons dark
Microservices pros and cons darkMicroservices pros and cons dark
Microservices pros and cons dark
 
Microservices pros and cons - houston tech fest
Microservices pros and cons - houston tech festMicroservices pros and cons - houston tech fest
Microservices pros and cons - houston tech fest
 
Jelastic - Containers Live Migration Behind the Scene
Jelastic - Containers Live Migration Behind the SceneJelastic - Containers Live Migration Behind the Scene
Jelastic - Containers Live Migration Behind the Scene
 
The impact of cloud NSBCon NY by Yves Goeleven
The impact of cloud NSBCon NY by Yves GoelevenThe impact of cloud NSBCon NY by Yves Goeleven
The impact of cloud NSBCon NY by Yves Goeleven
 
Allyourbase
AllyourbaseAllyourbase
Allyourbase
 
PromCon EU 2022 - Centralized vs Decentralized Prometheus Scraping Architectu...
PromCon EU 2022 - Centralized vs Decentralized Prometheus Scraping Architectu...PromCon EU 2022 - Centralized vs Decentralized Prometheus Scraping Architectu...
PromCon EU 2022 - Centralized vs Decentralized Prometheus Scraping Architectu...
 
The Need of Cloud-Native Application
The Need of Cloud-Native ApplicationThe Need of Cloud-Native Application
The Need of Cloud-Native Application
 
John adams talk cloudy
John adams   talk cloudyJohn adams   talk cloudy
John adams talk cloudy
 
Platform Clouds, Containers, Immutable Infrastructure Oh My!
Platform Clouds, Containers, Immutable Infrastructure Oh My!Platform Clouds, Containers, Immutable Infrastructure Oh My!
Platform Clouds, Containers, Immutable Infrastructure Oh My!
 
Latest (storage IO) patterns for cloud-native applications
Latest (storage IO) patterns for cloud-native applications Latest (storage IO) patterns for cloud-native applications
Latest (storage IO) patterns for cloud-native applications
 
Rami Sayar - Node microservices with Docker
Rami Sayar - Node microservices with DockerRami Sayar - Node microservices with Docker
Rami Sayar - Node microservices with Docker
 
Scaling a MeteorJS SaaS app on AWS
Scaling a MeteorJS SaaS app on AWSScaling a MeteorJS SaaS app on AWS
Scaling a MeteorJS SaaS app on AWS
 
Kubernetes
KubernetesKubernetes
Kubernetes
 
LASUG Online: Introduction to Docker and Docker Tools
LASUG Online: Introduction to Docker and Docker ToolsLASUG Online: Introduction to Docker and Docker Tools
LASUG Online: Introduction to Docker and Docker Tools
 
To Build My Own Cloud with Blackjack…
To Build My Own Cloud with Blackjack…To Build My Own Cloud with Blackjack…
To Build My Own Cloud with Blackjack…
 
Digital Transformation with Kubernetes, Containers, and Microservices
Digital Transformation with Kubernetes, Containers, and MicroservicesDigital Transformation with Kubernetes, Containers, and Microservices
Digital Transformation with Kubernetes, Containers, and Microservices
 
FreeSWITCH as a Microservice
FreeSWITCH as a MicroserviceFreeSWITCH as a Microservice
FreeSWITCH as a Microservice
 
Deploying microservices on AWS
Deploying microservices on AWSDeploying microservices on AWS
Deploying microservices on AWS
 
The Good, the Bad and the Ugly of Migrating Hundreds of Legacy Applications ...
 The Good, the Bad and the Ugly of Migrating Hundreds of Legacy Applications ... The Good, the Bad and the Ugly of Migrating Hundreds of Legacy Applications ...
The Good, the Bad and the Ugly of Migrating Hundreds of Legacy Applications ...
 
Migrating Hundreds of Legacy Applications to Kubernetes - The Good, the Bad, ...
Migrating Hundreds of Legacy Applications to Kubernetes - The Good, the Bad, ...Migrating Hundreds of Legacy Applications to Kubernetes - The Good, the Bad, ...
Migrating Hundreds of Legacy Applications to Kubernetes - The Good, the Bad, ...
 

Mais de dotCloud

Introduction to Docker and all things containers, Docker Meetup at RelateIQ
Introduction to Docker and all things containers, Docker Meetup at RelateIQIntroduction to Docker and all things containers, Docker Meetup at RelateIQ
Introduction to Docker and all things containers, Docker Meetup at RelateIQdotCloud
 
Introduction to Docker at SF Peninsula Software Development Meetup @Guidewire
Introduction to Docker at SF Peninsula Software Development Meetup @GuidewireIntroduction to Docker at SF Peninsula Software Development Meetup @Guidewire
Introduction to Docker at SF Peninsula Software Development Meetup @GuidewiredotCloud
 
Dockerizing stashboard - Docker meetup at Twilio
Dockerizing stashboard - Docker meetup at TwilioDockerizing stashboard - Docker meetup at Twilio
Dockerizing stashboard - Docker meetup at TwiliodotCloud
 
Docker links | Docker workshop #2 at Twitter
Docker links | Docker workshop #2 at TwitterDocker links | Docker workshop #2 at Twitter
Docker links | Docker workshop #2 at TwitterdotCloud
 
Dockerfile Basics | Docker workshop #2 at twitter, 2013-11-05
Dockerfile Basics | Docker workshop #2 at twitter, 2013-11-05Dockerfile Basics | Docker workshop #2 at twitter, 2013-11-05
Dockerfile Basics | Docker workshop #2 at twitter, 2013-11-05dotCloud
 
Intro Docker october 2013
Intro Docker october 2013Intro Docker october 2013
Intro Docker october 2013dotCloud
 
[Open stack] heat + docker
[Open stack] heat + docker[Open stack] heat + docker
[Open stack] heat + dockerdotCloud
 
Dockerizing WordPress
Dockerizing WordPressDockerizing WordPress
Dockerizing WordPressdotCloud
 
Building images from dockerfiles
Building images from dockerfilesBuilding images from dockerfiles
Building images from dockerfilesdotCloud
 
Docker at DevTable
Docker at DevTableDocker at DevTable
Docker at DevTabledotCloud
 
Docker presentation | Paris Docker Meetup
Docker presentation | Paris Docker MeetupDocker presentation | Paris Docker Meetup
Docker presentation | Paris Docker MeetupdotCloud
 
Lightweight Virtualization with Linux Containers and Docker | YaC 2013
Lightweight Virtualization with Linux Containers and Docker | YaC 2013Lightweight Virtualization with Linux Containers and Docker | YaC 2013
Lightweight Virtualization with Linux Containers and Docker | YaC 2013dotCloud
 
Installing and running Postfix within a docker container from the command line
Installing and running Postfix within a docker container from the command lineInstalling and running Postfix within a docker container from the command line
Installing and running Postfix within a docker container from the command linedotCloud
 
LXC, Docker, and the future of software delivery | LinuxCon 2013
LXC, Docker, and the future of software delivery | LinuxCon 2013LXC, Docker, and the future of software delivery | LinuxCon 2013
LXC, Docker, and the future of software delivery | LinuxCon 2013dotCloud
 
Docker Presentation at the OpenStack Austin Meetup | 2013-09-12
Docker Presentation at the OpenStack Austin Meetup | 2013-09-12Docker Presentation at the OpenStack Austin Meetup | 2013-09-12
Docker Presentation at the OpenStack Austin Meetup | 2013-09-12dotCloud
 

Mais de dotCloud (15)

Introduction to Docker and all things containers, Docker Meetup at RelateIQ
Introduction to Docker and all things containers, Docker Meetup at RelateIQIntroduction to Docker and all things containers, Docker Meetup at RelateIQ
Introduction to Docker and all things containers, Docker Meetup at RelateIQ
 
Introduction to Docker at SF Peninsula Software Development Meetup @Guidewire
Introduction to Docker at SF Peninsula Software Development Meetup @GuidewireIntroduction to Docker at SF Peninsula Software Development Meetup @Guidewire
Introduction to Docker at SF Peninsula Software Development Meetup @Guidewire
 
Dockerizing stashboard - Docker meetup at Twilio
Dockerizing stashboard - Docker meetup at TwilioDockerizing stashboard - Docker meetup at Twilio
Dockerizing stashboard - Docker meetup at Twilio
 
Docker links | Docker workshop #2 at Twitter
Docker links | Docker workshop #2 at TwitterDocker links | Docker workshop #2 at Twitter
Docker links | Docker workshop #2 at Twitter
 
Dockerfile Basics | Docker workshop #2 at twitter, 2013-11-05
Dockerfile Basics | Docker workshop #2 at twitter, 2013-11-05Dockerfile Basics | Docker workshop #2 at twitter, 2013-11-05
Dockerfile Basics | Docker workshop #2 at twitter, 2013-11-05
 
Intro Docker october 2013
Intro Docker october 2013Intro Docker october 2013
Intro Docker october 2013
 
[Open stack] heat + docker
[Open stack] heat + docker[Open stack] heat + docker
[Open stack] heat + docker
 
Dockerizing WordPress
Dockerizing WordPressDockerizing WordPress
Dockerizing WordPress
 
Building images from dockerfiles
Building images from dockerfilesBuilding images from dockerfiles
Building images from dockerfiles
 
Docker at DevTable
Docker at DevTableDocker at DevTable
Docker at DevTable
 
Docker presentation | Paris Docker Meetup
Docker presentation | Paris Docker MeetupDocker presentation | Paris Docker Meetup
Docker presentation | Paris Docker Meetup
 
Lightweight Virtualization with Linux Containers and Docker | YaC 2013
Lightweight Virtualization with Linux Containers and Docker | YaC 2013Lightweight Virtualization with Linux Containers and Docker | YaC 2013
Lightweight Virtualization with Linux Containers and Docker | YaC 2013
 
Installing and running Postfix within a docker container from the command line
Installing and running Postfix within a docker container from the command lineInstalling and running Postfix within a docker container from the command line
Installing and running Postfix within a docker container from the command line
 
LXC, Docker, and the future of software delivery | LinuxCon 2013
LXC, Docker, and the future of software delivery | LinuxCon 2013LXC, Docker, and the future of software delivery | LinuxCon 2013
LXC, Docker, and the future of software delivery | LinuxCon 2013
 
Docker Presentation at the OpenStack Austin Meetup | 2013-09-12
Docker Presentation at the OpenStack Austin Meetup | 2013-09-12Docker Presentation at the OpenStack Austin Meetup | 2013-09-12
Docker Presentation at the OpenStack Austin Meetup | 2013-09-12
 

Último

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
 
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
 
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
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
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
 
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
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
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
 
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
 
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
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 

Último (20)

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
 
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
 
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
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
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
 
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
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
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
 
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
 
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
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 

Building a smarter application Stack by Tomas Doran from Yelp

  • 1. Building a smarter application stack Tomas  Doran   @bobtfish   2014-­‐06-­‐10
  • 2. Docker is the future • Preaching to the converted here ;)
 • Game changing technology
 • No silver bullets (ever) • Introduces it’s own set of problems and issues • Dependency discovery / wiring • Scheduling 2
  • 3. Smartstack • One possible solution to discovery problems
 • This talk: • Application architecture • Problem(s) we’re solving • Why this solution works well for us • Alternate solutions 3
  • 4. Microservices - also the future! • The same as SOA • But one API per service. • Own data store!
 • Lots of services (dozens, maybe 100s)
 • All individually very simple • Easy to reason about. • Easy to replace 4
  • 5. Don’t break the site - ever!!! • Microservices are individually deployable! • When we say “Don’t break the site” • We mean • Don’t break all of the site! 5
  • 6. Don’t break the site - ever!!! • If you have graceful degradation… • You can ignore MTBF in the backend services! • You only care about MTTR. 6
  • 7. “I’ll just break this out into it’s own application, as it’ll be easier to maintain in 10 years time” - Pre seed funding nobody, ever! 7
  • 8. Monolith - the reality • Everyone has one of these :) • If you’re far enough down the path, you call this ‘The presentation layer’.
 • Still poses a challenge • need async requests • need graceful degradation 8
  • 9. Monolith - the reality • Most popular service
 • Most dependencies • Call into 10s or 100s of other services in a request!
 • Needs circuit breakers + dynamic configuration 9
  • 10. No silver bullet = No one solution • You should always have 2. • Nagios / Sensu • RRDs + Ganglia / Graphite + Diamond • YAML files / Zookeeper 10
  • 11. No silver bullet = No one solution • ‘Top down’ architecture sucks. • Instead, broad goals + ’Bottom up’ architecture • Internal competition! • Replacing the incumbent solution happens organically • If your thing works better, people will want to move! 
 • Not perfect! Better than top-down! 11
  • 12. “Humans are bad at predicting the performance of complex systems […]. Our ability to create large and complex systems fools us into believing that we’re also entitled to understand them”
 - Carlos Bueno “Mature optimization handbook”
 12
  • 13. Distributed complexity • Distributed systems introduce their own set of complexity • Reasoning about the whole system challenging • Timing/profiling/performance analysis non-trivial • Resource scheduling also non-trivial • 2nd order effects ! • Can’t reason about emergent behavior 13
  • 14. 14
  • 15. 15 ?
  • 16. 16 ? What the heck happened at 16:46?
  • 17. 17 ? And why did it stop at 17:00?
  • 18. Dynamic architecture • Cattle not pets • AWS and VMs in ‘the cloud’ started this • Docker takes it a step further
 • Explicitly manage persistent state • Explicit regular recycling • All updates are redeploys
 18
  • 19. Dependency nightmares • Almost everything has some dependencies • Simple example, web app with a mysql DB • App config in a YAML file
 • Mysql container address changes when you restart mysql! • Oops, app can’t find mysql!
 • Do I need to restart every application using mysql? • Sucks! • Do I need to rebuild application containers using mysql? • To edit the config YAML file! • Super super sucks! 19
  • 20. Runtime wiring • mysql failovers - the simple case!
 • Presentation layer talking to service REST layers • Different deployment schedules • No downtime
 • Only possible solution: wiring dependencies at runtime • A challenge • Also an opportunity
 • DNS is workable in some cases 20
  • 21. Dynamic discovery • Discovery becomes a core problem
 • DNS re-resolving not generally trustworthy • You need to test everything for this
 • DNS balancing (internally) is awful • Failed node + multiple connections/requests • DNS round robin • Everything sees failure • Slow to shift traffic • Round robin is crappy for load balancing
 21
  • 22. Externalized wiring • Remove a lot of complexity from the application domain
 • Run a load balancer (haproxy) on each machine
 • Applications always connect to load balancer on fixed host/port • localhost on traditional metal/VMs • supplied by —link or environment variables in Docker
 • Applications become wiring agnostic! 22
  • 24. ‘Client side load balancing’ • Lots of projects use this approach: • Project Atomic • Marathon + Mesos-Docker • vulcand (https://github.com/mailgun/vulcand) • Frontrunner (https://github.com/Wizcorp/ frontrunner) • Consul ! • Smartstack 24
  • 25. Legacy infrastructure • Physical machines • Application images in AMIs • kvm
 • Can’t just use container links or a Docker only solution
 • Want to use the same (uniform) solution everywhere. 25
  • 26. Entropy reduction • You can’t change everything at once!
 • Everything will tend towards chaos • ‘Old infrastructure’ • ‘New infrastructure’ • ‘New new infrastructure’ ! • Solution specifically chosen so it could be generic. 26
  • 27. SmartStack • 2 parts • Synapse • Nerve ! • Conceptually simple • Very flexible • Easy to hack on • Plays well on traditional machines • Plays well in docker 27
  • 28. Synapse • Does discovery against a pluggable backend • Writes out a haproxy configuration
 • Assign a well known port to all services • Application connects to that port • haproxy forwards to an available backend
 • Your application doesn’t need to know about discovery!
 • Technology agnostic - works the same on metal/VMs/Docker 28
  • 29. 29
  • 30. Why synapse? • haproxy is a well known solution • ruby - easy to modify • simple (has one job) • Pluggable - discovery with multiple methods: • JSON config (static) • zookeeper • etcd • docker API • ec2 tags • Flexible • Deploy one per instance • Or pairs as dedicated lbs 30
  • 31. Nerve • Health checks services • Health checks are pluggable. • HTTP (flexible) + mysql come out the box • Registers service information to backend • zookeeper • etcd (beta) 31
  • 32. 32
  • 33. Connector agnostic containers • On ‘real servers’ or VMs, running a synapse instance per box is fine.
 • In docker, we want to abstract more than that • Make containers connector agnostic! • They don’t need to know or care • Upgrade independently. 33
  • 34. Synapse <3 ambassador containers • ‘Ambassador pattern’ • Run a synapse ‘ambassador’ container on each host for each service • Link each application to the ambassador for each of it’s dependencies • Environment variables to each service’s haproxy • Separates synapse management (i.e. changing the wiring) from application management (i.e. upgrading the app version). 34
  • 35. 35
  • 36. Container links • Ambassador for service A presents: • port 8000 for HTTP REST service • port 8443 for HTTPS REST service ! • Container linking to ambassador sees: • SRVA_PORT_8000_TCP=tcp://172.17.0.8:6379 • SRVA_PORT_8000_TCP_PROTO=tcp • SRVA_PORT_8000_TCP_ADDR=172.17.0.8 • SRVA_PORT_8000_TCP_PORT=6379 • SRVA_PORT_8443_TCP=tcp://172.17.0.8:6380 • SRVA_PORT_8443_TCP_PROTO=tcp • SRVA_PORT_8443_TCP_ADDR=172.17.0.8 • SRVA_PORT_8443_TCP_PORT=6380 36
  • 37. Nerve registration container • Each app container gets a Nerve instance • Nerve registers its 1 app • Nerve instance can be generic • Make services all have a standard /health endpoint • Healthchecks standard • Only need one nerve container image! 37
  • 38. Alternate options • Just register the contents of the docker API into etcd • http://coreos.com/blog/docker-dynamic-ambassador- powered-by-etcd/ • No health checks • Docker only • confd • Consul • frontrunner - discovery from Marathon • Uses haproxy too • Less health checking options 38
  • 40. Issues • If you have lots of machines + services, you have a lot of Synapses • haproxy health checks can become expensive on end user apps • Nerve helps with this
 • Lots of small load balancers is harder to reason about than a few big ones 40
  • 42. Thanks • Slides will be online
 http://slideshare.net/bobtfish
 • Official Smartstack site:
 http://nerds.airbnb.com/smartstack-service-discovery-cloud/
 • Pre-built containers to play with + blog post
 http://engineeringblog.yelp.com/
 https://index.docker.io/u/bobtfish/synapse-etcd-amb/
 https://index.docker.io/u/bobtfish/nerve-etcd/
 • Questions? 42