The Next Generation of Microservices

  • Published on
    18-Mar-2018

  • View
    527

  • Download
    73

Transcript

The Next Genera,on of Microservices Phil Calado h9p://philcalcado.com @pcalcado highly distributed applica1on architectureWe can think of microservices as Highly distributed applica,on architectures are just a flavor ofdistributed compu1ngTechnical ChallengesOrganiza,on ChallengesIntroducing distribu,on into your architecture brings up newIntroducing distribu,on into your architecture brings up newThe example we will work with today: Recovering from temporary failureBack in 2013"I know, lets use microservicesTimeoutsYour code looks like this nowBiz LogicTimeoutsserverclientTimeoutsYour code looks like this nowBiz LogicTimeoutsRPC codeserverclient wait wait "I know, lets implement circuit breakers and ,meoutsCircuit breakersTimeoutsYour code looks like this nowBiz LogicTimeoutsTelemetryRPC codeserverclient client client client client client wait wait wait wait wait wait "I know, lets have all circuit breakers share state"I know, lets have all circuit breakers share stateAnswer to the question how did my application ended up importing a Zookeeper library again?"Circuit breakersTimeoutsYour code looks like this nowBiz LogicTimeoutsTelemetryRPC codeDistributed stateserverclient server server serverserver Which instance should we talk to? DNS be like'"I know, lets have clients keep track of healthy instancesCircuit breakersTimeoutsYour code looks like this nowBiz LogicTimeoutsTelemetryRPC codeDistributed stateClient-side Service DiscoveryAnd thats just for RPC reliability.What makes 2017 different?Experience reportsOpen-source sobware you can useCircuit breakersTimeoutsBiz LogicTimeoutsTelemetryRPC codeDistributed stateClient-side Service DiscoverySDKApplica,onTransportInternetNetworkCircuit breakersTelemetryRPC codeDistributed stateClient-side Service Discovery} TCP/IP} ?One way to think about itBut how does one go about adding a new layer to the TCP/IP stack?Sidecars to the rescueCircuit breakersTimeoutsBiz LogicTimeoutsTelemetryRPC codeDistributed stateClient-side Service DiscoverySCARY OUTSIDE WORLDSidecars to the rescueCircuit breakersTimeoutsBiz LogicTimeoutsTelemetryRPC codeDistributed stateClient-side Service DiscoverySCARY OUTSIDE WORLDSidecarSidecars to the rescueHow does that impact your service?Circuit breakersTimeoutsBiz LogicTimeoutsTelemetryRPC codeDistributed stateClient-side Service DiscoveryServicePlaformBiz LogicStabilityServicePlaformTimeoutsBiz LogicStabilityServicePlaformCapacity Security AvailabilityBiz LogicServicePlaformService MeshAllows our services to pretend some of those are trueIts not that these pa9erns arent used anymore, its just that the dumb work moved down the stack.New, optmised, protocols are quite opaque (e.g. gRPC and friends)Works be9er with metadata-rich protocolsIt makes it even harder to fully replicate produc,on earlier in the development cycleCoupled to the plaformNot everything will be part of the mesh, i.e. the network s,ll isnt homogeneousLeaky abstrac,onQ&A

Recommended

View more >