Microservices Standardization - Susan Fowler, Stripe

Post on 22-Jan-2018

2,556 views 0 download

transcript

a talk

Microservice Standardization

Susan Fowler

A Little Bit About Myself…

EngineeratStripeAuthorofProduction-ReadyMicroservices

Microservice Challenges at Scale

Challenge#1:OrganizationalSiloingandSprawl

• InverseConway’sLawformicroservices:theorgstructureofacompanyusingmicroserviceswillmirroritsarchitecture

• Microservicedevelopersbecomelikemicroservices(reallygoodatdoingonething)

• Communicationproblems• Operationaltasksmustbeshoulderedbydevelopmentteams

Microservice Challenges at Scale

Challenge#2:MoreWaystoFail

• Microservicesarepartsoflargeandcomplexdistributedsystems• Themoredistributedthesystem,themorewaysitcan(andwill)fail• Eachmicroservicebecomesapointoffailure

Microservice Challenges at Scale

Challenge#3:CompetitionforResources

• Amicroserviceecosystemisjustlikeanyotherecosystem• Hardwareresourcesarescarce• Engineeringresourcesarescarce• Difficulttoprioritize• Difficulttoscale

Microservice Challenges at Scale

Challenge#4:MisconceptionsaboutMicroservices

• Myth:MicroservicesaretheWildWest• Myth:Freereignoverarchitecturedecisions• Myth:Freedomtochooseanyprogramminglanguage• Myth:Freedomtochooseanydatabase• Myth:Microservicesareasilverbullet• Myth:Adoptingmicroservicesmeansanydeveloperscanbuildaservicethatdoesone

thingextraordinarilywell,theycandowhatevertheyneedorwanttodotobuildit,aslongasitgetsthejobdone

Microservice Challenges at Scale

Challenge#5:TechnicalSprawlandTechnicalDebt

• Everyoneusestheirfavoritetools• Everyonedeployswithcustomscripts• Everyonebuildscustominfrastructure• Athousandwaystodoeachthing

Microservice Challenges at Scale

Challenge#6:InherentLackofTrust

• Microservicesliveincomplexdependencychains,completelyreliantoneachother• Nowaytoknowforsurethatdependenciesarereliable• Nowaytoknowthatclientswon’tcompromisetheirmicroservice• Notrustattheorganizational,cross-team,orteamlevels• Nowayofknowingthatmicroservicescanbetrustedwithproductiontraffic:noway

ofknowingifmicroservicesareproduction-ready

The Need for Standardization at Scale

Reality:Microservicesarenotisolatedsystems

• Microservicesarepartofthemicroserviceecosystem,andbelongincomplexdependencychains

• Nomicroserviceorsetofmicroservicesshouldcompromisetheintegrityoftheoverallproductorsystem

The Need for Standardization at Scale

The Need for Standardization at Scale

The Need for Standardization at Scale

Solution:

• Holdallmicroservicestohigharchitectural,operational,andorganizationalstandards

• Amicroservicethatmeetsthesestandardsisdeemed“production-ready”,meaningthatitcanbetrustedwithproductiontraffic

The Need for Standardization at Scale

Approach:LocalStandardization

• Determinestandardsonamicroservice-by-microservicebasis• Figureoutwhatrequirementsareappropriateforeachindividualservice,gofromthere

Problems:

• Doesn’testablishorg,cross-team,teamtrust• Addstotechnicalsprawlandtechnicaldebt• Notscalable• Don’tknowifservicesareproduction-ready

The Need for Standardization at Scale

Approach:GlobalStandardization

• Determinestandardsthatapplytoallmicroserviceswithintheecosystem• Makethemgeneralenoughtoapplytoeverymicroservice• Makethemspecificenoughtobequantifiableandproducemeasurableresults

Problems:• Hardtodeterminefromscratchwhatappropriatestandardsare• Hardtofigureoutstandardsthatapplytoallmicroservicesandactuallymake

adifference

Production-Readiness Standards

Howdowegetavailability?

• Stability• Reliability• Scalability• Performance• Fault-Tolerance• Catastrophe-Preparedness• Monitoring• Documentation

Production-Readiness Standards

StabilityandReliability

• Wegetincreaseddevelopervelocitywithmicroservices,sotherearemorechanges,moredeployments,moreinstability

• Stabilityallowsustoreachavailabilitybygivinguswaystoresponsiblyhandlechangestomicroservices

• Areliablemicroserviceisonethatcanbetrustedbyitsclients,dependencies,andtheecosystemasawhole

• Stabilityandreliabilityarelinked:moststabilityrequirementshaveaccompanyingreliabilityrequirements(example:deploymentpipelines)

Production-Readiness Standards

ScalabilityandPerformance

• Microservicesneedtoscaleappropriatelywithincreasesintraffic• Scalabilityisessentialforavailability– amicroservicethatcan’tscalewith

expectedgrowthhasincreasedlatency,pooravailability,and(inmostcases)adrasticincreasein#ofincidentsandoutages

• Scalabilityandperformancearelinked:scalability=howmanyrequestsamicroservicecanhandle,performance=howwelltheservicecanprocessthosetasks

• Aperformantmicroservicehandlesrequestsquickly,processestasksefficiently,andproperlyutilizesresources

Production-Readiness Standards

Fault-ToleranceandCatastrophe-Preparedness

• Microservicesliveincomplicated,messyecosystemsincomplexdependencychains,andcan(anddo)failallofthetimeandineverywayimaginable

• Toensureavailability,microservicesneedtobeabletowithstandinternalandexternalfailures

• Example:resiliencytesting(codetesting,loadtesting,chaostesting)

Production-Readiness Standards

MonitoringandDocumentation

• Goodmonitoringallowsustoknowthestateofthesystematalltimes• Secondmostcommoncauseofoutagesislackofgoodmonitoring:ifyou’re

notawareofthestateofthesystem,youwon’tknowwhenthesystemfails• Documentationremovestechnicaldebt,asdoesunderstandingtheservices

attheorg,team,anddevlevels

Implementing Standardization

NowWhat?

• StepOne:Getbuyinfromalllevelsoftheorganization• Standardizationneedstobeadoptedanddrivenatalllevels

• Determineyourorganization’sproduction-readinessrequirements• Production-readinessrequirementsneedorganizationalcontext

inordertobeeffective• Makeproduction-readinesspartoftheengineeringculture

• Standardizationisnotahindranceorgate,it’saguide

Want to Learn More?

Twitter:@susanthesquark

Books:Production-ReadyMicroservicesandMicroservicesinProduction

BlogPosts:www.susanjfowler.com