Systems design · 1984 · Jerome H. Saltzer, David P. Reed & David D. Clark

End-to-End Arguments in System Design

Place complete checks for certain guarantees at application endpoints; lower-layer checks may improve performance but cannot replace endpoint knowledge.

How to read the original

  1. Read Introduction and identify the application-specific guarantee.
  2. Read End-to-end caretaking and list failure locations outside the communication subsystem.
  3. Read Performance aspects and explain why local recovery can remain valuable.

Put the guarantee where enough information exists

The end-to-end argument concerns functions whose complete correctness requires application knowledge at the endpoints. The paper’s careful-file-transfer example asks whether network reliability alone establishes that the intended file reached its final destination intact. Lower-level recovery may be valuable, yet still fail to cover storage, software, and endpoint mistakes. Read the argument as a test of a particular guarantee, not a slogan forbidding useful mechanisms inside a network.

Original reconstruction: a file with five failure boundaries

A laboratory sends a result file from machine A to machine B. The intended outcome is that B durably stores the same version that A’s application selected. Trace the bytes through source storage, A’s memory, packet transport, B’s memory, and destination storage. Suppose every link checksum validates, but a buffer-management defect on B changes one byte after the packet check. The network delivered exactly what it checked, while the application outcome is wrong.

Place a digest at the application boundary. A computes an expected digest for a stable source version. B writes the received file, reads the destination content according to its verification policy, and compares digests before acknowledging the required outcome. This detects many accidental changes outside the link boundary. The source-version condition matters: hashing a file while another process edits it can make “the same file” undefined. A snapshot, immutable object, or explicit locking contract supplies a coherent input.

A digest is not a universal proof. If an attacker replaces both the content and the expected digest, an unauthenticated comparison can accept the replacement. If a disk acknowledges writes that remain only in volatile cache, a pre-crash readback does not prove survival of power loss. The complete contract must identify the failure class, authenticate the expected value when required, and use storage synchronization with appropriate guarantees.

Why local recovery still helps

Consider a toy transfer of ten independent packets. Each packet has a 90% chance of successful delivery on one attempt. If the application retransmits the entire file whenever any packet is lost, the success probability of one whole-file attempt is 0.9^10, approximately 0.3487. With independent repeated attempts, the expected number of whole-file attempts is about 2.868, or 28.68 packet transmissions when every attempt sends all ten packets.

If each packet is locally retried until delivered, the expected transmissions per packet are 1/0.9, making the total about 11.11. An end-to-end verification can still run afterward. These numbers assume independent losses, negligible acknowledgements, no congestion effects, and complete-file retries in the first design. They are an original cost illustration, not measurements reported by the paper.

The comparison shows why an incomplete lower-layer mechanism can be worth implementing. It reduces expensive repetition while the endpoint retains responsibility for the stronger outcome. If corruption is extremely rare, the cost of the local mechanism may outweigh its savings. Measure the relevant distribution instead of treating redundancy as automatically good or bad.

Trace acknowledgements by their meaning

Name each acknowledgement precisely: packet received, bytes accepted into memory, file written, transaction committed, or durable result verified. A timeout after a successful commit creates an uncertain outcome for the caller. Retrying then needs an operation identifier or another application protocol to avoid duplicate effects. Transport delivery alone cannot decide whether repeating a business operation is safe.

To apply the reading, write the desired property first, enumerate every boundary that can violate it, and ask which component can observe enough to decide success. Then add lower-level support where it improves cost or feasibility. This method turns an architectural principle into an auditable placement decision.

Reconstruction exercise

A six-packet transfer succeeds independently per packet with probability 0.8 on each attempt. Compare expected packet transmissions under whole-file retry and independent per-packet retry, using the reading’s simplifying assumptions. Then explain why neither calculation establishes that the receiver durably stored the intended file version.

Worked solution

A complete attempt succeeds with probability 0.8^6=0.262144. The expected number of complete attempts is 1/0.262144, about 3.8147. Sending six packets on every attempt therefore costs about 22.888 packet transmissions on average. Independent local retry costs six times 1/0.8, or 7.5 transmissions. These expectations assume independent repeated trials and omit acknowledgement traffic, timeouts, congestion, and overhead. They compare recovery cost, not every correctness condition. Packets may be correct when checked but later corrupted in memory; the source may change during transfer; and a successful write may still be buffered. Establishing the intended result requires a stable source-version definition, a suitable endpoint integrity check, authentication when adversarial substitution is relevant, and a documented persistence boundary. Local recovery can reduce cost while that stronger endpoint protocol remains necessary.

Test the limits and transfer the idea

1. Failure trace and design · allow 50 minutes

Make a retried operation safe across a crash

A service starts with durable counter = 10 and receives request (id=42, add=5). Its reply may be lost, causing the client to retry with the same id. The network does not duplicate individual packets, but application retries are possible. The server can crash between durable writes.

Show why both naive orders fail: write the counter, then record id 42 as completed; or record id 42 first, then update the counter. Specify a single transactional state change that makes retries return the original result without repeating the addition. Explain what assumptions are still required and why network duplicate suppression cannot supply this application property.

Get a starting hint

A crash between the two writes exposes either a repeated effect or a missing effect. The request record and its business effect must become durable together.

Compare your reasoning with the worked solution

With effect-first ordering, the counter becomes 15 and the server crashes before recording id 42. On retry it sees no completed request and adds five again, reaching 20. With record-first ordering, the server records completion and crashes before updating the counter. A retry is suppressed even though the counter remains 10. Neither ordering closes the crash window.

The required transition is atomic: if id 42 is absent, compute result = counter + 5 and commit both counter = result and completed[42] = {operation: add 5, result: 15} in one durable transaction. If the id exists with the same operation, return its stored result without another addition. If the same id is reused with different arguments, reject the conflict. Concurrent attempts must serialize or use an equivalent uniqueness constraint so that only one transaction creates the id.

A crash before the commit leaves neither change; retry safely applies the operation. A crash after the commit leaves both changes; retry returns 15. Losing the reply therefore does not duplicate the effect. This does not promise eventual delivery during a permanent outage, or protect an external side effect outside the transaction. Retention of completed ids must cover the possible retry window, and client ids must be unique for distinct intended operations.

The paper's duplicate-suppression argument concerns the level at which intent is known. Two retries may be different network messages but the same application operation. This transactional counter is an original concrete design showing that distinction, not a claim that the paper specifies this database schema.

Check your reasoning

  • Gives both crash windows with incorrect final counters 20 and 10.
  • Specifies atomic effect plus request-result storage and handles concurrent/conflicting retries.
  • States durability, id-lifetime, and external-side-effect limits.

2. Expected-cost derivation · allow 40 minutes

Price a lower-layer recovery mechanism

A file has n independently transmitted packets. Each transmission attempt succeeds with probability p, independently across packets and retries. Strategy E sends all n packets per attempt and retries the entire file if any packet fails. Strategy L retries each failed packet locally. A packet transmission costs 1 under E and 1+h under L, where h is per-attempt recovery overhead. Both strategies retain the same final end-to-end validation, whose cost can be omitted from the comparison.

Derive expected transmission costs and the condition on h for L to be cheaper. Evaluate n=4, p=0.9, first with h=0.2 and then h=0.5. Identify two changes to the failure or cost model that would require redoing the calculation.

Get a starting hint

A geometric number of independent attempts with success probability s has mean 1/s. Under E, one whole-file attempt succeeds with probability p^n.

Compare your reasoning with the worked solution

Strategy E spends n units per attempt and succeeds with probability p^n, so its expected cost is n/p^n. Strategy L needs an expected 1/p attempts per packet, giving n(1+h)/p. L is cheaper when n(1+h)/p < n/p^n, equivalently h < p^(1-n) - 1.

For n=4 and p=0.9, the threshold is 1/0.9³ - 1 = approximately 0.371742. E costs 4/0.9⁴ = approximately 6.096632. At h=0.2, L costs 4(1.2)/0.9 = 5.333333, so local recovery saves expected transmission cost. At h=0.5, L costs 6.666667, so its overhead outweighs that benefit in this model.

The comparison preserves final end-to-end validation because local packet success does not establish all application-level correctness conditions. Local recovery can still improve performance, exactly the kind of distinction the paper asks a designer to examine.

Correlated burst losses invalidate p^n for a whole-file attempt. Early stopping after the first detected failure changes the fixed n cost per attempt. Latency penalties, acknowledgments, retained successful packets, variable packet sizes, and storage corruption would also change the equations. The numerical threshold is an original model result under explicit assumptions, not a universal network-design rule or a measurement reported by the paper.

Check your reasoning

  • Derives n/p^n and n(1+h)/p from geometric expectations.
  • Gets the threshold and both numerical comparisons correctly.
  • Retains end-to-end validation and identifies assumptions that alter the model.

Check your understanding

All packet checksums pass, but destination storage contains changed bytes. Which inference is justified?

  • The application outcome must still be correct.
  • The packet checks did not cover the entire required path.
  • Every checksum algorithm is useless.
  • More packet sequence numbers necessarily fix storage.
Explanation

A guarantee at one boundary can hold while another stage violates the application outcome.

Why retain per-packet recovery alongside final-file verification?

  • It replaces all endpoint reasoning.
  • It proves the sender selected the correct version.
  • It can reduce retransmission cost without establishing the complete application guarantee.
  • It authenticates every business action.
Explanation

Local mechanisms can be performance aids while endpoints check the stronger property.

Original paper and sources

Jerome H. Saltzer, David P. Reed, and David D. Clark. End-to-End Arguments in System Design. ACM Transactions on Computer Systems, 1984; revised from a 1981 conference paper.

Read the original paper →

Read the primary paper: MIT