3 estimates separate observation from impact
The packet-loss estimator calculates observed unique-shred loss, the chance that a multi-shred object is complete under an independent-loss model, and idealized FEC-set recovery probability. Each result has a different denominator.
Received rate alone cannot establish loss. Feed volume follows network activity, so falling below an assumed count within one short window does not establish dropped packets.
Method for observed gaps
For a sequence domain where the expected unique identities are known:
text
expected_unique = expected sequence positionsreceived_unique = distinct valid positions receivedmissing_unique = expected_unique - received_uniqueobserved_loss_rate = missing_unique / expected_uniqueobserved_loss_percent = observed_loss_rate * 100Duplicates are reported separately and do not increase received_unique. Invalid packets do not fill a position. Expected positions must come from valid protocol metadata, a complete companion source, or a clearly bounded FEC set.
An approximate 95 percent interval for a proportion can use the Wilson score method. The component shows the formula and uses it instead of the fragile normal approximation near zero loss. The interval describes sampling uncertainty under binomial assumptions, not burst correlation or unknown expected packets.
Method for object exposure
If packet loss is independent with probability q and an object requires n specific shreds, its no-loss probability is:
text
P(complete) = (1 - q)^nP(affected) = 1 - (1 - q)^nExpected affected objects across N similar objects are:
text
expected_affected = N * P(affected)This model ignores FEC and correlation. Use it to inspect input sensitivity, never as a burst-loss prediction.
Method for ideal FEC recovery
For k required original symbols, m parity symbols, and independent per-symbol loss q, recovery succeeds when at least k of k plus m independent symbols arrive.
text
P(recoverable) = sum from r=k to k+m of combination(k+m, r) * (1-q)^r * q^(k+m-r)The equivalent failure event is losing more than m symbols. The calculation assumes valid compatible symbols and ideal decoding. It does not include CPU deadline or metadata errors.
Worked observed-loss example
Assume a later complete source establishes 100,000 expected unique shred identities for an interval. The receiver has 99,950 unique valid identities and 80 duplicate datagrams.
text
missing_unique = 100,000 - 99,950 = 50observed_loss_rate = 50 / 100,000 = 0.0005observed_loss_percent = 0.05 percentduplicate_rate_by_expected = 80 / 100,000 = 0.08 percentFor that defined source comparison, observed unique loss is 0.05 percent. The result cannot locate the missing 50 packets; NIC, kernel, application, capture, and upstream counters identify the boundary.
Worked transaction-exposure example
Assume the same q of 0.0005 and a simplified transaction object that requires three specific shreds with no recovery.
text
P(complete) = (1 - 0.0005)^3 = 0.9995^3 = about 0.99850075 P(affected) = about 0.00149925 = about 0.1499 percentAcross 10,000 comparable objects, the model expects about 15 affected objects. Real transactions do not all span exactly three shreds, and entries share fragments. The example demonstrates why object impact can exceed the raw packet-loss percentage.
Worked FEC interpretation
Take a group with k equal to 32 data symbols and m equal to 32 coding symbols. Recovery can tolerate up to 32 missing symbols under the ideal coding model. With q equal to 0.0005, failure probability under independent loss is extremely small.
That result can be misleading in production. A burst can remove many adjacent data and coding packets. A receiver stall can drop the tail of an entire group. Correlated loss violates the independent binomial model. The tool therefore shows the ideal result beside observed burst lengths and group failures when a capture is supplied.
Locate the loss boundary
Compare sender or independent-source identities with NIC hardware counters, interface counters, kernel UDP statistics, socket overflow, application receive count, validation rejects, FEC gaps, and decoded entries. Counts cover different layers and may use different intervals.
A rising UDP receive-buffer error with stable NIC receipts points toward socket pressure. NIC missed-packet counters point earlier. An application identity gap with no lower-layer drop can come from filtering, parsing, or a bad expected-set definition.
Clock the interval precisely. Counter resets, interface restarts, and unrelated UDP traffic can invalidate subtraction. Where the measurement layer permits, select the purchased port and require sender 203.23.178.228.
Limitations
Independent packet loss is often the wrong model for a busy receiver. Interrupt delay, full rings, scheduler stalls, route events, and bursts create correlated gaps. The tool labels binomial results idealized and accepts an empirical burst distribution when available.
FEC recoverability does not mean recovery finished before a strategy deadline. It also does not make the original arrival complete. Track first-recoverable and decoded times.
Expected packet count cannot be derived from a mean packet-rate assumption for a short interval. Use sequence metadata or a reference source. Mean-rate comparison is capacity arithmetic only.
Packet capture can drop independently. A pcap gap may be a capture failure while the production socket succeeded. Instrument both paths and avoid claiming a network-loss percentage from one unverified file.
How it works out the answer
Compute observed_loss = missing_unique / expected_unique. Under an explicit independent-loss model with packet loss q, an n-shred object is complete with probability (1 − q)^n. For a Reed-Solomon group with k required symbols and m parity symbols, ideal recovery probability is the binomial sum from r = k through k + m of C(k + m, r)(1 − q)^r q^(k + m − r).
Questions
- Can I estimate packet loss from a mean packet rate?
- Not by comparing one interval with that mean. Feed rate varies with network activity. Loss needs an expected identity set from sequence metadata, a complete FEC group, sender records, or an independent source. A supplied mean is useful for capacity and stall arithmetic, not a short-window packet oracle.
- Why can transaction exposure exceed packet-loss percentage?
- A transaction or entry can depend on several specific shreds. Under independent loss q, an n-shred object's affected probability is one minus (one minus q) raised to n. Shared fragments, varying object sizes, FEC, and correlated bursts change real results, but the formula exposes the compounding sensitivity.
- Does FEC make UDP loss irrelevant?
- No. With enough compatible symbols, FEC may rebuild missing data. Large or correlated gaps can exceed parity, recovery costs CPU, and content may become ready after its latency deadline. Record direct arrivals, the first recoverable instant, decode completion, and unrecovered groups as distinct outcomes.