Unit 14 of 14 · about 6 hours · measure

Latency, availability, staleness, conflict, repair traffic and convergence measurement

A policy that answers more requests can still return older data or discard conflicts. Report those outcomes together, with the checked contract, so faster successful calls do not hide failed or indefinitely waiting work.

You'll be able to

  • Measure latency, successful completion fraction, version staleness, conflicts, repair traffic and convergence under declared observation boundaries.
  • Compare two replication policies under matched workloads and exogenous fault schedules.
  • Preserve a negative trade-off result and distinguish local measurements from simulated logical time.

Covers

Latency, availability and staleness measurementConflict, repair traffic and convergence measurement
1

Read

In this order, only the parts listed

0 of 3 done

  1. DDIA, 2nd edition: measuring freshness and replication costsDDIA 2e - Chapter 6 Replication and Chapter 10 Consistency Sections

    Chapter 6, Replication: Monitoring staleness and Single-Leader Versus Leaderless Replication Performance, pp. 234 to 236

  2. Gossip Glomers: broadcast efficiency metricsGossip Glomers - Broadcast and Grow-Only Counter

    Challenge 3d, Messages-per-operation and Stable latencies; Challenge 3e, Specification and Evaluation at https://fly.io/dist-sys/3e/

    Distinguish acknowledgement-to-observed-stability latency from client response latency. Use 3e's budgets only for its stated simulated workload, not as targets for loglab or a production database.

  3. Replicated Log and Stream Processor: measurement dossierReplicated Log and Stream Processor - Replication Slice

    Milestone E; Measurement requirements; Design-defense questions

    Use replication latency, lag, repair, failure and acknowledged-loss evidence only. Consumer and checkpoint metrics belong to later sections.

2

Focus on

  • Report successful-call latency separately from errors, timeouts and outstanding operations. Define the offered logical-operation denominator and observation window; retries are additional work, not new user operations.
  • Version staleness needs a known reference frontier in the same ordered lineage. For concurrent siblings there may be no unique latest version; report dependency gaps and conflict sets instead of subtracting arbitrary tags.
  • Count unique conflicting versions or keys with siblings using an explicit definition. Count all repair messages and encoded bytes, including retries and metadata, separately from useful payload.
  • After healing and stopping writes, define convergence as every intended live replica holding equivalent canonical versioned state. A replica still missing at the observation deadline makes convergence unobserved, not zero.
Common mistakes · 3
  • Comparing only successful-call p99 while dropping the slowest calls as timeouts.
  • Dividing server messages by broadcasts when the reported denominator includes both broadcasts and reads.
  • Treating the last observed missing read as the exact instant all replicas converged. Sampling only brackets the visibility transition.
3

Try it yourself

Closed-book, before checking anything

Build a Python 3 metric fixture with ten offered logical operations: eight complete successfully by the observation deadline, one has a definite failure and one remains pending. Report an 80% observed success fraction, while keeping failure and pending counts separate; do not call it CAP availability. In a separate single-writer, no-failover fixture, ten writes complete before three reads begin and no further writes occur. Reads returning states through positions 7, 10 and 8 have version gaps of 3, 0 and 2. Then compare asynchronous follower reads with reads that wait for a required applied frontier in loglab. Match workload, seeds, fault schedule, initial data, persistence boundaries and observation windows. Save full latency distributions, all outcomes, conflict counts, encoded repair bytes and post-heal convergence intervals; retain a case where the stricter policy waits or fails more often.
4

Quiz yourself

Answer first, then mark it. Missed ones go to Review.

0 got · 0 missed

  1. 1.How can response latency improve while the system gets less useful?Answer

    More slow operations may time out or fail and disappear from the success-only latency sample. Report offered load, successful goodput and all outcome counts alongside it.

  2. 2.Why is a broadcast stability metric not a client request duration?Answer

    The challenge measures from broadcast acknowledgement to the last read on any node that still missed the value. It estimates observed dissemination behavior after acknowledgement, not invocation-to-response time.

  3. 3.Why must a repair policy be measured after faults stop as well as during them?Answer

    Healing can release a backlog that competes with foreground work. Recovery traffic and time to convergence are part of the trade-off, not free background work.

  4. 4.May you compare staleness counts from one random workload with latency from another and infer a policy trade-off?Answer

    Not without controlling the workload and fault distributions. Use matched experiments, retain raw histories and repeat across paired seeds; report the spread rather than a single favorable run.

5

Practice

  • Gossip Glomers Challenge 3e: Efficient Broadcast, Part II

    Specification and Evaluation, continuing 3d with the same 25-node, 100 ms message-delay workload

    Run the Go implementation as local Maelstrom v0.2.4 processes. Compare 3d and 3e designs on the same configured workload, preserving each run's checker outcome, server messages per operation and stable-latency quantiles. The published budgets change both message and latency requirements; do not call one design universally faster. Recheck correctness under partitions. The section mini-project adds the matched consistency, conflict and repair comparison in loglab.

You're done when

Your dossier includes the exact metric-fixture results, a 3e baseline meeting its published correctness and efficiency checks, and a matched loglab comparison accounting for unsuccessful work, convergence coverage and one negative trade-off regime.

Only when you can do this without notes.

Leads to

Notes

Resources · 3 for this unit, 13 more in the section
  • DDIA 2e - Chapter 6 Replication and Chapter 10 Consistency SectionsMartin Kleppmann and Chris Riccomini · primary

    Read replication completely, then the consistency-model and linearizability portions of Chapter 10. Convert every named guarantee into allowed and forbidden histories before selecting implementation policy.

  • Gossip Glomers - Broadcast and Grow-Only CounterFly.io and Jepsen · required

    Each challenge runs locally under Maelstrom (v0.2.4; the pages were tested on 0.2.3) with its checker and, where the page says so, the partition nemesis; keep the run directory as the history. Do 3d and 3e (efficient broadcast, with message and latency budgets) and 4 (a grow-only counter over sequentially consistent storage). Explain why convergence alone does not imply linearizability or transaction isolation.

  • Replicated Log and Stream Processor - Replication SliceRoadmap-Final · support

    Add configurable replication, lag, failover, recorded histories, repair and a checked consistency contract. Preserve one violating history and the fix or narrowed claim.

Also in this section