{
  "slug": "k-of-n-completion",
  "term": "k-of-n completion",
  "aliases": [
    "k out of n completion"
  ],
  "definition": "A k-of-n completion rule finishes a logical operation after any k of n eligible component responses have completed.",
  "note": "The collection time is the kth ordered response time, measured from a shared request origin, when any eligible subset of size k suffices. With independent, identically distributed exponential response times of mean 1/μ, the expected time to collect any k of n is (H_n − H_(n−k))/μ, where H is the harmonic number. The kth-arrival identity does not require independence. Queueing can invalidate the IID response-time assumptions behind the harmonic expectation; the cited fork-join model instead derives bounds on mean response time. [kofn-delay]\n\nA coded read needs distinct valid fragments from one object generation and sufficient decoding rank; receiving k arbitrary messages is not enough. Metadata lookup and decoding may add time. One in-memory object cache reads k + 1 of k + r splits and decodes the first k to arrive; with k = 10 this costs at most 10% extra bandwidth and cut median and tail read latency by more than 50% relative to selective replication. [ec-cache]\n\nPairwise independence alone does not determine a three-response deadline probability. In an exact constructed example, every response is 1% late and every pair has the same independent joint distribution, yet an any-one-of-three read misses with probability anywhere from 0% to 0.01%; mutual independence gives 0.0001%. With three responses, needing one misses only if all three are late; needing two misses if at least two are late; needing all three misses if at least one is late. These are mathematical identification bounds for specified inputs, not confidence intervals or measured fleet probabilities. [pairwise-bounds] [pairwise-example]",
  "related": [
    "tail-latency",
    "erasure-coding",
    "fork-early-cancel",
    "hedged-request",
    "power-aware-coding"
  ],
  "citations": [
    {
      "id": "ec-cache",
      "title": "Rashmi et al. EC-Cache: Load-Balanced, Low-Latency Cluster Caching with Online Erasure Coding. OSDI 2016, sections 1, 4.3 and 6.6.2.",
      "url": "https://www.usenix.org/system/files/conference/osdi16/osdi16-rashmi.pdf",
      "accessed": "2026-10-23"
    },
    {
      "id": "example",
      "title": "Hesela: k-of-n response collection and exact joint-state examples",
      "url": "https://hesela.com/analyses/storage-tail-slowdowns-raid-fanout/#kofn-completion",
      "accessed": "2026-10-20"
    },
    {
      "id": "kofn-delay",
      "title": "Joshi, Liu and Soljanin. On the Delay-Storage Trade-off in Content Download from Coded Distributed Storage Systems. arXiv 1305.3945v2, 2013.",
      "url": "https://arxiv.org/pdf/1305.3945v2",
      "accessed": "2026-10-23"
    },
    {
      "id": "pairwise-bounds",
      "title": "Ramachandra and Natarajan. Tight Probability Bounds with Pairwise Independence. arXiv:2006.00516v6, 2022; introduction and section 4.1.",
      "url": "https://arxiv.org/pdf/2006.00516v6",
      "accessed": "2026-10-29"
    },
    {
      "id": "pairwise-example",
      "title": "Hesela: exact three-response distributions and reproducible calculation, not measured performance.",
      "url": "https://hesela.dev/research/pairwise-replica-tails/PUBLICATION.md",
      "accessed": "2026-10-29"
    }
  ],
  "status": "research",
  "advantages": [
    {
      "text": "Late binding to the first k arrivals means a single slow server need not determine the latency of the whole operation.",
      "citationIds": [
        "ec-cache"
      ]
    }
  ],
  "limitations": [
    {
      "text": "Each extra request adds load: beyond one or two additional reads the tail benefit was small, and many more would raise communication and bandwidth overhead in proportion.",
      "citationIds": [
        "ec-cache"
      ]
    },
    {
      "text": "The IID distribution and expectation formulas require mutually independent response times; the kth-arrival identity itself does not. A shared file-size component can correlate service times.",
      "citationIds": [
        "kofn-delay"
      ]
    },
    {
      "text": "Pair statistics do not replace aligned logical-request outcomes; cancellations and timeouts can leave component completion times unobserved.",
      "citationIds": [
        "pairwise-bounds",
        "pairwise-example"
      ]
    }
  ],
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "updated": "2026-11-03",
  "provenance": [
    "kofn-delay read 2026-10-23, sections II, III and IV-C, for the order-statistic expectation, the queueing bounds and the correlated service model.",
    "ec-cache read 2026-10-23, sections 1, 4.3 and 6.6.2, for late binding, the k = 10 and 10% bandwidth configuration and additional-read results.",
    "2026-10-29: Joshi et al. v2, II-B and III-B, distinguishes the arrival identity from IID expectation formulas. Ramachandra and Natarajan v6, introduction and 4.1, supports the pairwise/mutual distinction. Hesela's example is mathematical, not empirical.",
    "2026-11-03: rechecked five primary papers and the exact eight-state derivation; clarified the difference between required-response counts and late-response counts. Existing mathematical scenarios retained, no device measurements or independent peer review claimed."
  ]
}
