Download - Deploy Microservices in the Real World
![Page 1: Deploy Microservices in the Real World](https://reader035.vdocuments.mx/reader035/viewer/2022062306/5a64d2627f8b9a4d0b8b49f3/html5/thumbnails/1.jpg)
Deploying Microservices
Deploying Microservices Russell Perkins5/4/2017
![Page 2: Deploy Microservices in the Real World](https://reader035.vdocuments.mx/reader035/viewer/2022062306/5a64d2627f8b9a4d0b8b49f3/html5/thumbnails/2.jpg)
About KenzanCore offeringsApplication Development, Platform as a service, cloud virtualization, platform engineering, consulting services and business transformation.
Primary ClientsMulti billion dollar companies and media/content providers such as Thompson Reuters, Charter & Cablevision
LocationsProvidence (RI), New York (NY), Denver (CO), Los Angeles (CA), and a London presence
Founded in 2004.
We are a software engineering and digital consulting firm that has been helping clients Make Next Possible for over a decade:
Full Service Consulting FirmArchitecture, front and back end development, business analysis and DevTest.
Cloud Virtualization Experts And EnablersAWS, Netflix stack, enterprise architecture and beyond.
DevOps LeadershipPlatform builds, continuous delivery and scalable resourcing.
Veterans of the Media IndustryMigrations, enterprise wide solutions, digital experts and thought leaders.
Employee focused Collaboration, communication and culture are key.
![Page 3: Deploy Microservices in the Real World](https://reader035.vdocuments.mx/reader035/viewer/2022062306/5a64d2627f8b9a4d0b8b49f3/html5/thumbnails/3.jpg)
Agenda
● What is CI/CD
● Deployment types
● On prem physical servers
● Calculating health against SLO’s and SLA’s
● Canary Deployments
● Common causes of outages
![Page 4: Deploy Microservices in the Real World](https://reader035.vdocuments.mx/reader035/viewer/2022062306/5a64d2627f8b9a4d0b8b49f3/html5/thumbnails/4.jpg)
Continuous IntegrationContinuous Deployments
Of course..But how?
![Page 5: Deploy Microservices in the Real World](https://reader035.vdocuments.mx/reader035/viewer/2022062306/5a64d2627f8b9a4d0b8b49f3/html5/thumbnails/5.jpg)
Deployment Pipelines
Central code repositoryAutomated builds
Self-testingAutomated deployment
![Page 6: Deploy Microservices in the Real World](https://reader035.vdocuments.mx/reader035/viewer/2022062306/5a64d2627f8b9a4d0b8b49f3/html5/thumbnails/6.jpg)
Deployment PipelinesSimple
Git Push Unit Tests Elastic Beanstalk
![Page 7: Deploy Microservices in the Real World](https://reader035.vdocuments.mx/reader035/viewer/2022062306/5a64d2627f8b9a4d0b8b49f3/html5/thumbnails/7.jpg)
Deployment PipelinesComplex
Unit Tests Integration Tests
End to End Tests
Stress Tests
Test AWS account
Git Push
Stable AWS
accountManual Judgment Production
![Page 8: Deploy Microservices in the Real World](https://reader035.vdocuments.mx/reader035/viewer/2022062306/5a64d2627f8b9a4d0b8b49f3/html5/thumbnails/8.jpg)
Cattle Not Pets
Pets:Servers or server pairs that are treated as indispensable or unique systems that can never be down. Typically they are manually built, managed, and “hand fed”.
Cattle:Arrays of more than two servers, that are built using automated tools, and are designed for failure, where no one, two, or even three servers are irreplaceable. Typically, during failure events no human intervention is required as the array exhibits attributes of “routing around failures” by restarting failed servers or replicating data through strategies like triple replication or erasure coding.
![Page 9: Deploy Microservices in the Real World](https://reader035.vdocuments.mx/reader035/viewer/2022062306/5a64d2627f8b9a4d0b8b49f3/html5/thumbnails/9.jpg)
Types of Deployments
![Page 10: Deploy Microservices in the Real World](https://reader035.vdocuments.mx/reader035/viewer/2022062306/5a64d2627f8b9a4d0b8b49f3/html5/thumbnails/10.jpg)
Rolling Deployment
![Page 11: Deploy Microservices in the Real World](https://reader035.vdocuments.mx/reader035/viewer/2022062306/5a64d2627f8b9a4d0b8b49f3/html5/thumbnails/11.jpg)
Red / Black DeploymentA/Z, Blue/Green
![Page 12: Deploy Microservices in the Real World](https://reader035.vdocuments.mx/reader035/viewer/2022062306/5a64d2627f8b9a4d0b8b49f3/html5/thumbnails/12.jpg)
On-Premise Physical Servers
![Page 13: Deploy Microservices in the Real World](https://reader035.vdocuments.mx/reader035/viewer/2022062306/5a64d2627f8b9a4d0b8b49f3/html5/thumbnails/13.jpg)
Cattle Not Pets(again)
Seriously
![Page 14: Deploy Microservices in the Real World](https://reader035.vdocuments.mx/reader035/viewer/2022062306/5a64d2627f8b9a4d0b8b49f3/html5/thumbnails/14.jpg)
Kubernetes
![Page 15: Deploy Microservices in the Real World](https://reader035.vdocuments.mx/reader035/viewer/2022062306/5a64d2627f8b9a4d0b8b49f3/html5/thumbnails/15.jpg)
Cloud Bursting
Cloud bursting is an application deployment model in which an application runs in a private cloud or data center and
bursts into a public cloud when the demand for computing capacity spikes.
![Page 16: Deploy Microservices in the Real World](https://reader035.vdocuments.mx/reader035/viewer/2022062306/5a64d2627f8b9a4d0b8b49f3/html5/thumbnails/16.jpg)
Hybrid Cloud Models
![Page 17: Deploy Microservices in the Real World](https://reader035.vdocuments.mx/reader035/viewer/2022062306/5a64d2627f8b9a4d0b8b49f3/html5/thumbnails/17.jpg)
Pilot Light
Design:● Images (AMI’s, containers, ect) are copied to the cloud● Auto Scale Groups update to use latest image● Cluster sizes set to 0
Benefits:● Low overhead costs● Can be activated fairly quickly.
![Page 18: Deploy Microservices in the Real World](https://reader035.vdocuments.mx/reader035/viewer/2022062306/5a64d2627f8b9a4d0b8b49f3/html5/thumbnails/18.jpg)
Warm Standby
Design:● Images (AMI’s, containers, ect) are copied to the cloud● Auto Scale Groups update to use latest image● Cluster sizes set to a reasonable number, no less than 2.
Benefits:● Can be activated instantly
![Page 19: Deploy Microservices in the Real World](https://reader035.vdocuments.mx/reader035/viewer/2022062306/5a64d2627f8b9a4d0b8b49f3/html5/thumbnails/19.jpg)
Multi-Site
Design:● Images (AMI’s, containers, ect) are copied to the cloud● Auto Scale Groups update to use latest image● Cluster sizes set to a reasonable number, no less than
2.● Some traffic is always directed to the cloud servers.
Benefits:● Always active● Far away regions can use the cloud for reduced latency.
![Page 20: Deploy Microservices in the Real World](https://reader035.vdocuments.mx/reader035/viewer/2022062306/5a64d2627f8b9a4d0b8b49f3/html5/thumbnails/20.jpg)
Uptime with SLO’s and SLA’s
![Page 21: Deploy Microservices in the Real World](https://reader035.vdocuments.mx/reader035/viewer/2022062306/5a64d2627f8b9a4d0b8b49f3/html5/thumbnails/21.jpg)
Service Level Objectives&
Service Level Agreements
SLO:SLOs are specific measurable characteristics of the SLA such as availability, throughput, frequency, response time, or quality.
SLA:The SLA is the entire agreement that specifies what service is to be provided, how it is supported, times, locations, costs, performance, and responsibilities of the parties involved.
![Page 22: Deploy Microservices in the Real World](https://reader035.vdocuments.mx/reader035/viewer/2022062306/5a64d2627f8b9a4d0b8b49f3/html5/thumbnails/22.jpg)
Uptime and Automation
99.9% 8 hrs 45 mins
99.99% 52 mins
99.999% 5 mins
Uptime Percentage Acceptable yearly outages
![Page 23: Deploy Microservices in the Real World](https://reader035.vdocuments.mx/reader035/viewer/2022062306/5a64d2627f8b9a4d0b8b49f3/html5/thumbnails/23.jpg)
Traditional Uptime Monitoring
![Page 24: Deploy Microservices in the Real World](https://reader035.vdocuments.mx/reader035/viewer/2022062306/5a64d2627f8b9a4d0b8b49f3/html5/thumbnails/24.jpg)
Monitoring via logs
Logging Tools:● AWS CloudWatch● GCP StackDriver
logging● Graylog● ELK Stack
Metrics to track:● HTTP status codes● CPU Usage● Memory● DiskSpace● Network
![Page 25: Deploy Microservices in the Real World](https://reader035.vdocuments.mx/reader035/viewer/2022062306/5a64d2627f8b9a4d0b8b49f3/html5/thumbnails/25.jpg)
Canary Deployments
![Page 26: Deploy Microservices in the Real World](https://reader035.vdocuments.mx/reader035/viewer/2022062306/5a64d2627f8b9a4d0b8b49f3/html5/thumbnails/26.jpg)
Slow is better
We want to make sure our software works in the real world.
But...
Users are both predictable and unpredictable Different regions and devices may behave differentlySome issues (memory leaks) only appear overtime.
![Page 27: Deploy Microservices in the Real World](https://reader035.vdocuments.mx/reader035/viewer/2022062306/5a64d2627f8b9a4d0b8b49f3/html5/thumbnails/27.jpg)
Canary Watcher
Simple script run every 10 mins and monitors health / logs.
Keeps track of the deployment state (10%, 50%, ect)
Automatically remove from LB if an SLO is missed.
Can be run ad hoc
![Page 28: Deploy Microservices in the Real World](https://reader035.vdocuments.mx/reader035/viewer/2022062306/5a64d2627f8b9a4d0b8b49f3/html5/thumbnails/28.jpg)
Real Time
Applications can be self aware.
Alerts can trigger removal from a LB or auto rollback
![Page 29: Deploy Microservices in the Real World](https://reader035.vdocuments.mx/reader035/viewer/2022062306/5a64d2627f8b9a4d0b8b49f3/html5/thumbnails/29.jpg)
Common Causes of Outages
![Page 30: Deploy Microservices in the Real World](https://reader035.vdocuments.mx/reader035/viewer/2022062306/5a64d2627f8b9a4d0b8b49f3/html5/thumbnails/30.jpg)
Common Causes of Outages
● Overload● Retry Spikes● Pets● Monitoring Gaps● Scaling Boundaries● Bad Configuration● Lengthy Startup Times
![Page 31: Deploy Microservices in the Real World](https://reader035.vdocuments.mx/reader035/viewer/2022062306/5a64d2627f8b9a4d0b8b49f3/html5/thumbnails/31.jpg)
Want to learn more?Follow us!
@kenzanmedia
www.linkedin.com/company/kenzan-media
techblog.kenzan.com
www.facebook.com/kenzanmedia/