The Next Generation of Microservices YOW 2017 Brisbane

  • Published on
    18-Mar-2018

  • View
    375

  • Download
    68

Transcript

The Next Generation of MicroservicesPhil Caladohttp://philcalcado.com@pcalcadohighly distributed application architectureWe can think of microservices as Highly distributed application architectures are just a flavor ofdistributed computingTechnical ChallengesOrganization ChallengesIntroducing distribution into your architecture brings up newIntroducing distribution 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 codeserverclientwaitwait "I know, lets implement circuit breakers and timeoutsCircuit breakersTimeoutsYour code looks like this nowBiz LogicTimeoutsTelemetryRPC codeserverclient client client client client clientwaitwait 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 state"I know, lets have clients keep track of healthy instancesserverclientserver server serverserverWhich instance should we talk to?DNS be like'Circuit breakersTimeoutsYour code looks like this nowBiz LogicTimeoutsTelemetryRPC codeDistributed stateClient-side Service DiscoveryAnd thats just for RPC reliability.What makes 2017 different?Experience reportsOpen-source software you can useCircuit breakersTimeoutsBiz LogicTimeoutsTelemetryRPC codeDistributed stateClient-side Service DiscoverySDKApplicationTransportInternetNetworkCircuit 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 DiscoveryServicePlatformBiz LogicStabilityServicePlatformTimeoutsBiz LogicStabilityServicePlatformCapacity Security AvailabilityBiz LogicServicePlatformService MeshAllows our services to pretend some of those are trueIts not that these patterns 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 better with metadata-rich protocolsIt makes it even harder to fully replicate production earlier in the development cycleCoupled to the platformNot everything will be part of the mesh,i.e. the network still isnt homogeneousLeaky abstractionQ&A