Skip to content

12.4. Testing in Distributed Systems

Testing a distributed system is fundamentally harder than testing a monolith, because the bugs live in the interactions — the timeout that fires under load, the message that arrives twice, the replica that lags — and none of them appear when services are tested in isolation. This chapter covers integration and contract testing at service boundaries, end-to-end testing and its flakiness, testing asynchronous and eventually-consistent flows, staging fidelity, load testing, and the correctness testing (Jepsen, deterministic simulation) that hunts for the consistency violations unit tests can never find.