Managing and Scaling Microservices with Docker in the Wild
-
Upload
alois-mayr -
Category
Software
-
view
357 -
download
1
Transcript of Managing and Scaling Microservices with Docker in the Wild
![Page 1: Managing and Scaling Microservices with Docker in the Wild](https://reader031.fdocuments.net/reader031/viewer/2022021506/58ae28001a28ab557e8b457d/html5/thumbnails/1.jpg)
Managing and scaling microservices with Docker in the wild
Alois Mayr @mayralois [email protected]
Oct27th2015
![Page 2: Managing and Scaling Microservices with Docker in the Wild](https://reader031.fdocuments.net/reader031/viewer/2022021506/58ae28001a28ab557e8b457d/html5/thumbnails/2.jpg)
Industry adop>on of microservices
Microservices deployments vs monolithic deployments
Container orchestra>on and scaling
Op>mizing microservices deployments
Is my environment healthy?
Agenda
![Page 3: Managing and Scaling Microservices with Docker in the Wild](https://reader031.fdocuments.net/reader031/viewer/2022021506/58ae28001a28ab557e8b457d/html5/thumbnails/3.jpg)
Who we are and what we do
![Page 4: Managing and Scaling Microservices with Docker in the Wild](https://reader031.fdocuments.net/reader031/viewer/2022021506/58ae28001a28ab557e8b457d/html5/thumbnails/4.jpg)
![Page 5: Managing and Scaling Microservices with Docker in the Wild](https://reader031.fdocuments.net/reader031/viewer/2022021506/58ae28001a28ab557e8b457d/html5/thumbnails/5.jpg)
Whenpeopletalkaboutcloud-scalecompanies...
![Page 6: Managing and Scaling Microservices with Docker in the Wild](https://reader031.fdocuments.net/reader031/viewer/2022021506/58ae28001a28ab557e8b457d/html5/thumbnails/6.jpg)
![Page 7: Managing and Scaling Microservices with Docker in the Wild](https://reader031.fdocuments.net/reader031/viewer/2022021506/58ae28001a28ab557e8b457d/html5/thumbnails/7.jpg)
Industry adop-on of microservices
Microservices deployments vs monolithic deployments
Container orchestra>on and scaling
Op>mizing microservices deployments
Is my environment healthy?
![Page 8: Managing and Scaling Microservices with Docker in the Wild](https://reader031.fdocuments.net/reader031/viewer/2022021506/58ae28001a28ab557e8b457d/html5/thumbnails/8.jpg)
![Page 9: Managing and Scaling Microservices with Docker in the Wild](https://reader031.fdocuments.net/reader031/viewer/2022021506/58ae28001a28ab557e8b457d/html5/thumbnails/9.jpg)
![Page 10: Managing and Scaling Microservices with Docker in the Wild](https://reader031.fdocuments.net/reader031/viewer/2022021506/58ae28001a28ab557e8b457d/html5/thumbnails/10.jpg)
![Page 11: Managing and Scaling Microservices with Docker in the Wild](https://reader031.fdocuments.net/reader031/viewer/2022021506/58ae28001a28ab557e8b457d/html5/thumbnails/11.jpg)
h+ps://ruxit.com/docker
![Page 12: Managing and Scaling Microservices with Docker in the Wild](https://reader031.fdocuments.net/reader031/viewer/2022021506/58ae28001a28ab557e8b457d/html5/thumbnails/12.jpg)
Industry adop>on of microservices
Microservices deployments vs monolithic deployments
Container orchestra>on and scaling
Op>mizing microservices deployments
Is my environment healthy?
![Page 13: Managing and Scaling Microservices with Docker in the Wild](https://reader031.fdocuments.net/reader031/viewer/2022021506/58ae28001a28ab557e8b457d/html5/thumbnails/13.jpg)
Credit:SlavoljubPantelic/Shu+erstock.com
![Page 14: Managing and Scaling Microservices with Docker in the Wild](https://reader031.fdocuments.net/reader031/viewer/2022021506/58ae28001a28ab557e8b457d/html5/thumbnails/14.jpg)
Monolithicdeployment:10-20servicesperprocess
![Page 15: Managing and Scaling Microservices with Docker in the Wild](https://reader031.fdocuments.net/reader031/viewer/2022021506/58ae28001a28ab557e8b457d/html5/thumbnails/15.jpg)
MicroservicesapplicaFon:1serviceperprocess20FmesthenumberofJVMs!
![Page 16: Managing and Scaling Microservices with Docker in the Wild](https://reader031.fdocuments.net/reader031/viewer/2022021506/58ae28001a28ab557e8b457d/html5/thumbnails/16.jpg)
MonolithicDeploymentofServices
FullMicroServiceDeploymentusingContainers
Service-orientedAPMdoesn’texposeJVMexplosionwithinmicroservicesarchitectures
![Page 17: Managing and Scaling Microservices with Docker in the Wild](https://reader031.fdocuments.net/reader031/viewer/2022021506/58ae28001a28ab557e8b457d/html5/thumbnails/17.jpg)
7:00a.m.Lowload,servicerunningwithminimumredundancy
12:00p.m.ScaledupserviceduringpeakloadwithfailoverofproblemaFcnode
7:00p.m.Scaledbackdowntolowerload,movetodifferentgeolocaFon
DeploymentsarenolongerstaHc
![Page 18: Managing and Scaling Microservices with Docker in the Wild](https://reader031.fdocuments.net/reader031/viewer/2022021506/58ae28001a28ab557e8b457d/html5/thumbnails/18.jpg)
Microservicesarchitecturescanbecomplex
![Page 19: Managing and Scaling Microservices with Docker in the Wild](https://reader031.fdocuments.net/reader031/viewer/2022021506/58ae28001a28ab557e8b457d/html5/thumbnails/19.jpg)
Industry adop>on of microservices
Microservices deployments vs monolithic deployments
Container orchestra-on and scaling
Op>mizing microservices deployments
Is my environment healthy?
![Page 20: Managing and Scaling Microservices with Docker in the Wild](https://reader031.fdocuments.net/reader031/viewer/2022021506/58ae28001a28ab557e8b457d/html5/thumbnails/20.jpg)
h+p://radar.oreilly.com/2015/10/swarm-v-fleet-v-kubernetes-v-mesos.html
Marathon EC2ContainerService
![Page 21: Managing and Scaling Microservices with Docker in the Wild](https://reader031.fdocuments.net/reader031/viewer/2022021506/58ae28001a28ab557e8b457d/html5/thumbnails/21.jpg)
CommonfeaturesoforchestraHontools
• DistribuFonofcontainerswithinacluster• Pre-configuredbyuseofDSL• Poolingandco-locaFngcontainers/servicesbyvariousconcepts
• Pods,labels,tags,taskdescripFons,etc.• Resourceschedulingwithinacluster• Scalingofresources/containers• Servicehealthchecks• Zero-downFmefail-overmechanisms• Networking-SDNs
![Page 22: Managing and Scaling Microservices with Docker in the Wild](https://reader031.fdocuments.net/reader031/viewer/2022021506/58ae28001a28ab557e8b457d/html5/thumbnails/22.jpg)
Fail-overcontainersacrossdatacenters
1.Failedcontainer2.Newcontainer
![Page 23: Managing and Scaling Microservices with Docker in the Wild](https://reader031.fdocuments.net/reader031/viewer/2022021506/58ae28001a28ab557e8b457d/html5/thumbnails/23.jpg)
Low-trafficservice:2runningcontainers
Runningcontainers
Failedcontainer
Lowtraffic
![Page 24: Managing and Scaling Microservices with Docker in the Wild](https://reader031.fdocuments.net/reader031/viewer/2022021506/58ae28001a28ab557e8b457d/html5/thumbnails/24.jpg)
Containerview:traffic/load
ContainerisunderuFlized(Tomcatisidle)
Tomcatreceivesrequestsforabout15hrs
1serviceperTomcat
![Page 25: Managing and Scaling Microservices with Docker in the Wild](https://reader031.fdocuments.net/reader031/viewer/2022021506/58ae28001a28ab557e8b457d/html5/thumbnails/25.jpg)
Killingcontainerswheninfailuremode
Failurerateforhealthcheckincreased
![Page 26: Managing and Scaling Microservices with Docker in the Wild](https://reader031.fdocuments.net/reader031/viewer/2022021506/58ae28001a28ab557e8b457d/html5/thumbnails/26.jpg)
ShortcomingsofexisHngapproaches
• StaFcpre-configuredcontainerorchestraFon• Manuallyadjustednumberofrunningcontainers• HealthchecksmaynotreflectservicefuncFonality/availability• Schedulingbasedoninfrastructuremetrics:
• Networktraffic• CPUuFlizaFon
• Absenceofservice-orientedscheduling
![Page 27: Managing and Scaling Microservices with Docker in the Wild](https://reader031.fdocuments.net/reader031/viewer/2022021506/58ae28001a28ab557e8b457d/html5/thumbnails/27.jpg)
MisconfiguraFoncankillorchestraFonlayer
Queueanddeploymentmethodsareslow
![Page 28: Managing and Scaling Microservices with Docker in the Wild](https://reader031.fdocuments.net/reader031/viewer/2022021506/58ae28001a28ab557e8b457d/html5/thumbnails/28.jpg)
Industry adop>on of microservices
Microservices deployments vs monolithic deployments
Container orchestra>on and scaling
Op-mizing microservices deployments
Is my environment healthy?
![Page 29: Managing and Scaling Microservices with Docker in the Wild](https://reader031.fdocuments.net/reader031/viewer/2022021506/58ae28001a28ab557e8b457d/html5/thumbnails/29.jpg)
What’simportant
1. Whichservicesaretobeco-located?• Relateservicestoinfrastructure• Cascadingservicesimpactscheduling(snowballeffect)
2. Capacityplanning• Howmanyresourcesarerequired?• Infrastructureandcontainermetrics
3. What’stheidealnumberofcontainersperservice?4. ServicedeploymentvalidaFon
• Whataretheeffectsofscalingservices?
![Page 30: Managing and Scaling Microservices with Docker in the Wild](https://reader031.fdocuments.net/reader031/viewer/2022021506/58ae28001a28ab557e8b457d/html5/thumbnails/30.jpg)
#1–Whocallswho?
![Page 31: Managing and Scaling Microservices with Docker in the Wild](https://reader031.fdocuments.net/reader031/viewer/2022021506/58ae28001a28ab557e8b457d/html5/thumbnails/31.jpg)
#1–Whocallswho?
![Page 32: Managing and Scaling Microservices with Docker in the Wild](https://reader031.fdocuments.net/reader031/viewer/2022021506/58ae28001a28ab557e8b457d/html5/thumbnails/32.jpg)
#1–Whocallswho?
![Page 33: Managing and Scaling Microservices with Docker in the Wild](https://reader031.fdocuments.net/reader031/viewer/2022021506/58ae28001a28ab557e8b457d/html5/thumbnails/33.jpg)
#1–Whocallswho?
MostFmespentinCreditCardVerificaFonservice
![Page 34: Managing and Scaling Microservices with Docker in the Wild](https://reader031.fdocuments.net/reader031/viewer/2022021506/58ae28001a28ab557e8b457d/html5/thumbnails/34.jpg)
#2–Capacityplanning
• OrchestraFontoolscanusetags/labels• Affinityandconstraintrules• Capacityplanningbasedonlyonkeymetricsisinsufficient
• CPU,Memory• NetworkIOisimportantinmicroservicesarchitectures
![Page 35: Managing and Scaling Microservices with Docker in the Wild](https://reader031.fdocuments.net/reader031/viewer/2022021506/58ae28001a28ab557e8b457d/html5/thumbnails/35.jpg)
#1–Whichservicestobeco-located?#2–CapacityplanningincludesnetworkIO
![Page 36: Managing and Scaling Microservices with Docker in the Wild](https://reader031.fdocuments.net/reader031/viewer/2022021506/58ae28001a28ab557e8b457d/html5/thumbnails/36.jpg)
#3–Idealnumberofcontainersperservice?
• Dependsonworkloadandservicedependencies• Calledandcallingservices• #Requests/minandslowest10%response-Fme• CanbederivedfrommonitoringdataviaAPI
• h+ps://blog.ruxit.com/ruxit-data-export-api/
![Page 37: Managing and Scaling Microservices with Docker in the Wild](https://reader031.fdocuments.net/reader031/viewer/2022021506/58ae28001a28ab557e8b457d/html5/thumbnails/37.jpg)
#4–ServicedeploymentvalidaHon
APP1APP2
APP1dependsonAPP2
Whereisthisspecified?
• Resourceplanningandschedulingiswastedifdeploymentsdeviatefromplan
![Page 38: Managing and Scaling Microservices with Docker in the Wild](https://reader031.fdocuments.net/reader031/viewer/2022021506/58ae28001a28ab557e8b457d/html5/thumbnails/38.jpg)
Industry adop>on of microservices
Microservices deployments vs monolithic deployments
Container orchestra>on and scaling
Op>mizing microservices deployments
Is my environment healthy?
![Page 39: Managing and Scaling Microservices with Docker in the Wild](https://reader031.fdocuments.net/reader031/viewer/2022021506/58ae28001a28ab557e8b457d/html5/thumbnails/39.jpg)
Containermetricsaren’tenough
![Page 40: Managing and Scaling Microservices with Docker in the Wild](https://reader031.fdocuments.net/reader031/viewer/2022021506/58ae28001a28ab557e8b457d/html5/thumbnails/40.jpg)
Healthdependsonmanycomponentsandvariables!
![Page 41: Managing and Scaling Microservices with Docker in the Wild](https://reader031.fdocuments.net/reader031/viewer/2022021506/58ae28001a28ab557e8b457d/html5/thumbnails/41.jpg)
Be+ertoask:Whatbroke?
WhatsFllworks?
![Page 42: Managing and Scaling Microservices with Docker in the Wild](https://reader031.fdocuments.net/reader031/viewer/2022021506/58ae28001a28ab557e8b457d/html5/thumbnails/42.jpg)
820BILLIONdependencies!
ProblemresoluFonisascalabilityproblem
Waytoomanycomponentsinvolved
TheMushroomcloudeffectNetworkproblem
![Page 43: Managing and Scaling Microservices with Docker in the Wild](https://reader031.fdocuments.net/reader031/viewer/2022021506/58ae28001a28ab557e8b457d/html5/thumbnails/43.jpg)
1./logsranoutofspace
2./var/lib/dockerranoutofspace
![Page 44: Managing and Scaling Microservices with Docker in the Wild](https://reader031.fdocuments.net/reader031/viewer/2022021506/58ae28001a28ab557e8b457d/html5/thumbnails/44.jpg)
Freetrial-h+ps://ruxit.com/docker-monitoring/Blog-h+ps://blog.ruxit.com/
@ruxit
Try Ruxit for free! Work with us. Share your feedback