System Design: service mesh architecture
This course explains service mesh architecture using a single Ruby application as the reference case. It separates in-process service objects from network services and shows why a network call can end with no answer. It covers the sidecar pattern, using Thruster in front of Puma as a small example, and the spectrum of places where cross-cutting concerns can live. It then describes the control plane, the failures a mesh adds, and an inventory of the application that shows a mesh would connect nothing.
What you'll learn
- ✓The difference between an in-process service object and a service reached over a network
- ✓How the sidecar pattern moves network handling out of application code
- ✓Where cross-cutting concerns can live, from application code to a control plane
- ✓How the data plane and the control plane divide the work of a mesh
- ✓Failures a mesh adds: retry storms, version skew and the strict mTLS trap
- ✓Reading an architecture decision from an inventory of processes, languages and calls
The word service means two things
This application contains 54 files ending in _service.rb. It needs no service mesh, and understanding why those two facts sit together is most of what this course is for.
Read the full lesson free →Curriculum
7 lessonsThe word service means two things
A service object is an in-process method call, while a network service can fail by giving no answer.
The sidecar you already run
The sidecar proxy handles the network beside each service, and Thruster in front of Puma is a small example.
Where cross-cutting concerns live
Cross-cutting concerns sit on a spectrum where moving outward trades visibility for uniformity, shown through nine Rack::Attack throttles.
The control plane
The control plane configures sidecars from outside the request path, distributing identities and routing rules and collecting telemetry.
The failures a mesh adds
A mesh adds failures such as four-way debugging, retry storms, version skew and outages from strict mTLS.
What this application would do
An inventory of one process, one language and zero service-to-service calls shows a mesh would connect nothing here.
Putting it together
A recap of the course and a challenge to implement mesh_overhead, computing the latency sidecars add along a chain.