Fallacy: A Distributed System Can Be Debugged Like a Local One

The fallacy that a distributed system can be debugged like a local one is not one of the eight classic Fallacies of Distributed Computing, but every team that moves from a monolith to distributed services runs into it. It is the assumption that when something goes wrong, you’ll be able to find it the way you always have: reproduce it on your machine, set a breakpoint, and read the stack trace.
Table of Contents
What the Fallacy Assumes
Teams working under this fallacy rely on unstructured log messages written to each server’s local disk, add diagnostics only after an incident, and expect to reproduce production problems on a developer workstation. Observability is treated as an operations concern to add later, not a design requirement.
Why It’s False
In a single process, a failure leaves a stack trace that shows exactly how execution got there. In a distributed system, that context is scattered:
- One request, many processes. A single user action may pass through a gateway, several services, a message broker, and background workers. Each writes its own logs, in its own place, with no shared identifier.
- Stack traces stop at the network. An exception in one service tells you nothing about the call chain that led to it in other services.
- Failures depend on timing. Race conditions, timeouts, and partial failures depend on latency, load, and the interleaving of events across machines. They often disappear when you try to observe them - the classic heisenbug.
- You can’t reproduce production. Your laptop doesn’t have production’s data, scale, network topology, or concurrent users. Many failures only occur under exactly those conditions.
- You can’t pause the world. Setting a breakpoint in one service doesn’t stop the others. Upstream callers time out, messages are redelivered, and the system’s behavior changes because you’re debugging it.
- Asynchronous work is disconnected. When work moves through queues, the code that caused a problem may have run minutes or hours before the code that reveals it.
Designing for Debuggability
These are some of the techniques that make distributed systems understandable when things go wrong:
- Propagate correlation IDs. Assign every request and message a correlation ID at the edge, pass it through every call and message, and include it in every log entry, so you can reconstruct everything that happened for a single request.
- Use distributed tracing. Instrument services with OpenTelemetry so each request produces a trace showing every hop, its timing, and where it failed. Propagate trace context through message headers as well as HTTP.
- Write structured logs. Log events as structured data with consistent field names rather than free-form text, and send them to a central store where they can be searched and correlated.
- Collect metrics. Track request rates, error rates, latency percentiles, and queue depths for every service and dependency, so you can see where a problem started.
- Make errors descriptive. Include which dependency failed, what was being attempted, and relevant identifiers in error messages. See Descriptive Error Messages.
- Test failure deliberately. Use fault injection and chaos experiments to trigger timeouts, crashes, and network partitions in a controlled way, rather than waiting for production to find them.
- Run realistic environments locally. Tools such as .NET Aspire and container orchestration can run a multi-service system on a workstation with tracing and logging wired up, narrowing the gap between local and production.
- Keep it simple where you can. The easiest distributed system to debug is the one that isn’t distributed. A Modular Monolith keeps clear boundaries while preserving the stack trace.
Related Concepts
- Observability - the practice of understanding a system from its outputs
- There Is One Administrator - debugging often spans systems owned by different people
- Latency Is Zero - tracing is how you find out where the time went
- Modular Monolith - modularity without the debugging cost of distribution
References
- OpenTelemetry - vendor-neutral tracing, metrics, and logging standard
- Dapper, a Large-Scale Distributed Systems Tracing Infrastructure - Sigelman et al.
- Observability Engineering - Charity Majors, Liz Fong-Jones, and George Miranda
- .NET Aspire overview - Microsoft Learn
- The Three New Fallacies of Distributed Computing - Thoughtworks Technology Podcast with Neal Ford and Mark Richards, who describe this fallacy as “observability is optional” (video)