deploy microservices in the real world

31
Deploying Microservices Deploying Microservices Russell Perkins 5/4/2017

Upload: elana-krasner

Post on 22-Jan-2018

97 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: Deploy Microservices in the Real World

Deploying Microservices

Deploying Microservices Russell Perkins5/4/2017

Page 2: Deploy Microservices in the Real World

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

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

Continuous IntegrationContinuous Deployments

Of course..But how?

Page 5: Deploy Microservices in the Real World

Deployment Pipelines

Central code repositoryAutomated builds

Self-testingAutomated deployment

Page 6: Deploy Microservices in the Real World

Deployment PipelinesSimple

Git Push Unit Tests Elastic Beanstalk

Page 7: Deploy Microservices in the Real World

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

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

Types of Deployments

Page 10: Deploy Microservices in the Real World

Rolling Deployment

Page 11: Deploy Microservices in the Real World

Red / Black DeploymentA/Z, Blue/Green

Page 12: Deploy Microservices in the Real World

On-Premise Physical Servers

Page 13: Deploy Microservices in the Real World

Cattle Not Pets(again)

Seriously

Page 14: Deploy Microservices in the Real World

Kubernetes

Page 15: Deploy Microservices in the Real World

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

Hybrid Cloud Models

Page 17: Deploy Microservices in the Real World

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

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

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

Uptime with SLO’s and SLA’s

Page 21: Deploy Microservices in the Real World

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

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

Traditional Uptime Monitoring

Page 24: Deploy Microservices in the Real World

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

Canary Deployments

Page 26: Deploy Microservices in the Real World

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

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

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

Common Causes of Outages

Page 30: Deploy Microservices in the Real World

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

Want to learn more?Follow us!

@kenzanmedia

www.linkedin.com/company/kenzan-media

techblog.kenzan.com

www.facebook.com/kenzanmedia/