Lesser-Known Realities in Distributed System Design
Many classic concepts in distributed systems are frequently simplified or misunderstood. This article uncovers several overlooked realities—from the true context of the CAP theorem and the cost of total ordering to the boundaries of idempotency and split-brain trade-offs. By clarifying these aspects, developers can make more informed, evidence-based decisions during system design and failure mitigation.
In the study and practice of distributed systems, many repeatedly cited “classic conclusions” are often simplified, misinterpreted, or mythologized. This article delves into several easily overlooked realities, restoring their true context and providing actionable engineering advice.
1. CAP Theorem is Not “Pick Two Out of Three”
1.1 The Source of Misinterpretation
Many resources describe CAP as choosing two out of Consistency, Availability, and Partition tolerance, as if engineers can freely pick any two. However, this ignores a critical premise: Network Partition (P) is not optional.
In cross-datacenter distributed deployments, network failures, message loss, and node timeouts are objective realities. Therefore, the real choice only occurs at the moment a partition happens:
- Choose C (Consistency): Reject some requests during the partition, sacrificing Availability.
- Choose A (Availability): Continue responding to requests but might return stale data, sacrificing linearizability.
1.2 Engineering Implications
When no partition occurs, the system can absolutely provide both strong consistency and high availability. CAP describes the trade-off boundary under extreme network conditions, not the normal daily operating state. Treating CAP as a binary “pick two” switch is the most common cognitive trap for beginners.
2. “Order” is a Scarce Resource in Distributed Systems
2.1 Physical Clocks are Unreliable
System clocks across different nodes experience drift, and NTP synchronization can only converge errors to the millisecond level. Thus, any solution relying on timestamp magnitude to determine event sequence is flawed in cross-node scenarios.
2.2 Total Order vs. Partial Order
In distributed systems, partial order (causal order) can usually be obtained cheaply, while total order (all events are comparable) requires additional coordination mechanisms, such as:
Total Order Broadcast├── Essentially equivalent to the consensus problem├── Commonly seen in primary-backup log replication and state machine replication└── Cost: Throughput is limited by a single log channel
A practical fact is that Total Order Broadcast and consensus protocols are equivalent in capability. If you can implement one, you can construct the other. This explains why many consensus algorithms (like Raft or Paxos) fundamentally maintain a replicated log.
3. Idempotency is Not Just “Same Result on Duplicate Execution”
3.1 Strict Definition
The strict meaning of idempotency is that executing an operation once or multiple times results in the same final system state. Note that it constrains the state, not the return value of each call—returning an error code like “record already exists” upon a retry perfectly satisfies idempotent semantics.
3.2 Boundary Issues
Common idempotency implementations rely on unique request IDs for deduplication, but there are two hidden traps:
- Deduplication state is itself distributed state. If the deduplication table and the business operation are not within the same transaction boundary, a failure in writing the deduplication record can still lead to duplicate executions.
- Timeout is not failure. When the caller initiates a retry after a timeout, the first request might still be executing. This requires concurrent deduplication (e.g., locking or state machine interception), not just historical deduplication.
In engineering, it is recommended to put the deduplication key and the business data into the same storage transaction, which is the simplest and most reliable approach.
4. Split-Brain Has No Perfect Solution, Only Trade-offs
When a cluster is split by a network partition into two “islands” where majorities cannot communicate, how do you prevent both sides from accepting writes? Common methods include:
- Majority Quorum: Only the side with majority votes can continue serving; the other side actively degrades to read-only.
- Third-party Arbitration Service: Introduce an external witness node, but the witness service itself can fail.
- Lease Mechanism: Lock leadership via a lease with a timeout, but clock drift can affect lease safety.
The key reality here is that all solutions merely reduce the probability of split-brain; they cannot theoretically eliminate it. During design, you should assume split-brain can happen and prepare manual data repair processes and reconciliation mechanisms.
5. Consistency Levels are a Spectrum, Not a Switch
Beyond the classic strong vs. eventual consistency, real-world systems feature a rich consistency spectrum: linearizability, sequential consistency, causal consistency, read-your-writes, monotonic reads, etc. A practical recommendation is to declare the required level per business read/write path, rather than tagging the entire system with a generic label. For example, a “read-after-write” scenario only requires read-your-writes consistency, which can usually be achieved at a low cost via session stickiness (routing the same request to the same node), without needing global linearizability.
6. Observability: The Culprit Behind Slow Queries is Often Queuing
Tail latency (P99) in distributed systems is rarely due to a single slow computation; rather, it is the result of requests queuing and stacking at multiple points: thread pool queues, network buffer queues, storage IO queues. An underestimated rule of thumb is that in a multi-tier serial architecture, even if each tier’s P99 is only 50 milliseconds, the overall P99 will significantly deteriorate after ten tiers. Effective methods to optimize tail latency include setting queue limits at all levels, using hedged requests, and allocating an end-to-end timeout budget tier by tier.
Conclusion
The reason these distributed systems facts are “lesser-known” is often not because they are rare, but because common conclusions are over-simplified in transmission. Understanding the context of CAP, the cost of order, the boundaries of idempotency, the trade-offs of split-brain, and the consistency spectrum helps developers make evidence-based judgments during real failures and architecture reviews, rather than applying slogan-like conclusions. It is recommended to establish a “trade-off explanation” practice in design documents within your team, explicitly writing down every hidden assumption—this itself is the most effective distributed systems practice.
