The Next Generation of Microservices
Phil Calçado http://philcalcado.com @pcalcado
The Next Generation of Microservices Phil Calado - - PowerPoint PPT Presentation
The Next Generation of Microservices Phil Calado http://philcalcado.com @pcalcado We can think of microservices as highly distributed application architecture Highly distributed application architectures are just a flavor of distributed
The Next Generation of Microservices
Phil Calçado http://philcalcado.com @pcalcado
highly distributed application architecture
We can think of microservices as
Highly distributed application architectures are just a flavor of
distributed computing
Technical Challenges Organization Challenges
Introducing distribution into your architecture brings up new
Introducing distribution into your architecture brings up new
The example we will work with today:
Recovering from temporary failure
Back in 2013…
"I know, let’s use microservices”
Your code looks like this now
Biz Logic Timeoutsserver client
Your code looks like this now
Biz Logic Timeouts RPC codeserver client 🔦 🔦 🔦
🔦
wait
☺ 😱
🔦 🔦
wait
☺ 😱
🔦
☺ ☺ ☺ ☺ ☺ ☺ ☺ ☺
"I know, let’s implement circuit breakers and timeouts”
Your code looks like this now
Biz Logic Timeouts Telemetry RPC codeserver client client client client client client
🔦
wait
☺ 😱
🔦 🔦
wait
☺ 😱
🔦
☺ ☺ ☺ ☺ ☺ ☺ ☺ ☺
🔦
wait
☺ 😱
🔦
🔦
☺
wait
😱 ☺
🔦
🔦
wait
😱 ☺
🔦
🔦
wait
😱 ☺
🔦
🔦
…
"I know, let’s have all circuit breakers share state”
"I know, let’s have all circuit breakers share state”
Answer to the question “how did my application ended up importing a Zookeeper library again?"
Your code looks like this now
Biz Logic Timeouts Telemetry RPC code Distributed stateserver client 🔦 🔦 🔦 server server server server 🔦 🔦 🔦 💪 🤕
Which instance should we talk to?
☺
DNS be like…
"I know, let’s have clients keep track of healthy instances”
Your code looks like this now
Biz Logic Timeouts Telemetry RPC code Distributed state Client-side Service DiscoveryAnd that’s just for RPC reliability.
What makes 2017 different?
Experience reports Open-source software you can use
SDK
One way to think about it
But how does one go about adding a new layer to the TCP/IP stack?
Sidecars to the rescue
Circuit breakers Timeouts Biz Logic Timeouts Telemetry RPC code Distributed state Client-side Service Discovery SCARY OUTSIDE WORLDSidecars to the rescue
Circuit breakers Timeouts Biz Logic Timeouts Telemetry RPC code Distributed state Client-side Service Discovery SCARY OUTSIDE WORLDSidecar
Sidecars to the rescue
How does that impact your service?
Service Platform
Stability
Service Platform
Service Platform
Capacity Security AvailabilityService Platform
Service Mesh
Allows our services to pretend some of those are true
It’s not that these patterns aren’t used anymore, it’s 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 protocols
It makes it even harder to fully replicate production earlier in the development cycle
Coupled to the platform
Not everything will be part of the mesh, i.e. the network still isn’t homogeneous
Leaky abstraction
Q&A