The Next Generation of Microservices Phil Calçado http://philcalcado.com @pcalcado
We can think of microservices as highly distributed application architecture
Highly distributed application architectures are just a flavor of distributed computing
Introducing distribution into your architecture brings up new Organization Technical Challenges Challenges
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 Timeouts Timeouts Biz Logic
client server
Your code looks like this now Timeouts Timeouts RPC code Biz Logic
client server 🔦 🔦 🔦
☺ 😱 ☺ ☺ 😱 ☺ ☺ ☺ wait wait 🔦 🔦 🔦 ☺ ☺ ☺ ☺ 🔦
"I know, let’s implement circuit breakers and timeouts”
Your code looks like this now Telemetry Timeouts Timeouts Circuit breakers RPC code Biz Logic
client client client client client client server
☺ 😱 ☺ ☺ 😱 ☺ ☺ ☺ 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 Distributed state Telemetry Timeouts Timeouts Circuit breakers RPC code Biz Logic
Which instance should we talk to? 🤕 client server server server server server 💪 🔦 🔦 🔦 🔦 🔦 ☺ 🔦
DNS be like… 路
"I know, let’s have clients keep track of healthy instances”
Your code looks like this now Client-side Service Discovery Distributed state Telemetry Timeouts Timeouts Circuit breakers RPC code Biz Logic
And that’s just for RPC reliability.
What makes 2017 different?
Open-source Experience software you reports can use
Client-side Service Discovery Timeouts Timeouts Distributed state SDK Biz Logic Telemetry Circuit breakers RPC code
One way to think about it Client-side Service Discovery } ? Distributed state Telemetry Circuit breakers RPC code } TCP/IP Application Transport Internet Network
But how does one go about adding a new layer to the TCP/IP stack?
Sidecars to the rescue Client-side Service Discovery Timeouts Timeouts Distributed state SCARY OUTSIDE Biz Logic Telemetry WORLD Circuit breakers RPC code
Sidecars to the rescue Client-side Service Discovery Timeouts Timeouts Distributed state Sidecar SCARY OUTSIDE Telemetry Biz Logic WORLD Circuit breakers RPC code
Sidecars to the rescue
How does that impact your service?
Service Biz Logic Client-side Service Discovery Platform Timeouts Timeouts Distributed state Telemetry Circuit breakers RPC code
Service Biz Logic Platform Stability
Service Biz Logic Platform Timeouts Stability Capacity Security Availability
Service Biz Logic 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 .
Works better with metadata-rich protocols New, optmised, protocols are quite opaque (e.g. gRPC and friends)
Coupled to the platform It makes it even harder to fully replicate production earlier in the development cycle
Leaky abstraction Not everything will be part of the mesh, i.e. the network still isn’t homogeneous
Q&A
Recommend
More recommend