13 DTN Epidemic Routing
13.1 Begin With One Copy
A protocol means an agreed set of rules for passing data. Picture two field teams that meet only now and then. One phone holds a safety note. When the teams meet, the note can be copied. Later, either team may meet the base camp. More copies can raise the chance that the note arrives.
Make the first choice small. Name the message. Name its useful life. Set a copy limit. Set aside space for it. Decide which meetings count. Then run a simple contact test. Start with one carrier. Add two meetings. Count the live copies, the bytes sent, and the energy used. Also check what happens when the note is old or the store is full.
The gain has a cost. Fast spread can crowd out newer work. A long useful life can waste power. A tight limit can miss the only path to the goal. This first story does not predict real movement or prove the best limit. Use the Practitioner layer to set bounds and field checks. Use the Under the Hood layer to model copy growth, contact rates, and resource use. Those deeper routes show when broad copying helps and when it becomes the failure.
13.2 Start Simple
Start with devices that have to pass useful data before any fixed network is guaranteed. In DTN Epidemic Routing, the first question is not the protocol name; it is which neighbors, routes, failure signals, and degraded behaviors you would trust in the field.
13.3 Start With a Message That Spreads by Contact
Epidemic routing uses contact opportunities aggressively. When two nodes meet, they compare what messages they carry and exchange missing copies so delivery odds rise through replication.
That simple rule can rescue data in disconnected IoT environments, but it can also consume buffers, energy, and airtime quickly. Start with one message copy, then watch how every contact multiplies both opportunity and cost.
13.4 Flooding as DTN Trade-off
Epidemic routing is a delay-tolerant networking strategy for places where an end-to-end path may not exist when a message is created. Nodes store a message, carry it while disconnected, and forward a copy when they meet another node that does not already have it. The design goal is high delivery opportunity, not low overhead.
The important question is not whether epidemic routing can spread a message. It can. The important question is whether the deployment can afford the copies, contact time, buffer space, energy, and stale-message cleanup that flooding creates.
A clean overview starts by naming what the extra copies are buying. In a wildlife collar network, a replicated sighting may be acceptable because the next gateway contact is uncertain and the payload is small. In a battery-powered alarm system, the same replication pattern may be reckless if urgent alarms must share a short contact with routine sensor logs. Epidemic routing is therefore a policy choice about delivery probability, delay tolerance, and resource burn.
The common mistake is to treat epidemic routing as ordinary wireless broadcast. It is not a one-hop flood that disappears when the transmission ends. Each accepted copy becomes stored state with an owner, an expiration rule, and a chance to create more copies at the next encounter. The reader should be able to answer three questions before any diagram looks convincing: who may carry the payload, when does a copy stop spreading, and what lower-value work is displaced when the contact window is full?
Epidemic routing improves the chance of eventual delivery by giving a payload more potential carriers, but every new carrier consumes storage and may spend airtime and energy later. Use Figure 13.1 to see where that trade-off enters the protocol and why a deployment needs stopping rules before its first opportunistic contact.
The trace in Figure 13.1 opens at T=0 — Create P1, where node A holds the only copy. At T=1 — Exchange IDs, A and B first compare a summary vector and only then copy; that ordering prevents a transmission when the peer already has P1. By T=2 — Copy Spread, the drawing shows 4 copies, making the exponential sequence 1, 2, 4, 8, … concrete. The protocol does not contain an automatic notion of “enough,” so T=3+ — Stop Rule must supply one: delivery, TTL expiry, buffer policy, or a replication limit. That progression connects store-carry-forward reliability to the chapter’s resource argument. A routing design is incomplete if it celebrates extra delivery paths without also specifying which rule halts copying and which queued payload loses capacity while P1 remains live.
The short timeline establishes that copies can grow quickly; the next question is what must happen at each encounter before that growth is justified. Use Figure 13.2 to test the forwarding rule against one complete trace, paying particular attention to the checks that prevent “epidemic” from meaning indiscriminate transmission.
In Figure 13.2, t0 — Source S creates and stores message M42 starts the TTL and copy limits while S owns M42 — copy 1. At t1 — Opportunistic encounter: S meets relay A, the numbered notes require the peers to exchange summary IDs, confirm that A lacks M42, and check eligibility before S sends anything; S retaining its buffered copy is replication rather than custody transfer. The later t4 encounter shows why that inventory check matters: B and C both list M42, so no payload crosses the link. Finally, t5 — C encounters destination D records delivery only for this trace and leaves other carriers waiting for a cleanup notice or TTL expiry. The trace turns the broad reliability argument into an implementable policy: every additional path exists because an inventory, lifetime, buffer, contact, and energy gate admitted one more live copy.
The event trace explains how individual copies are admitted, but a deployment decision also needs a network-wide view of the resulting state. Compare the two node classes in Figure 13.3 to see how one transmission changes both delivery opportunity and the population of devices carrying cleanup obligations.
In Figure 13.3, the purple nodes marked M belong to Infected (carrying message), whereas the grey nodes marked ? remain Susceptible (no message). The diagram’s red edge identified as Active transmission is the transition between those classes: after that exchange, another device can encounter the destination, but it also holds state, occupies buffer space, and may transmit again. The multiple M nodes therefore represent both path diversity and accumulated cost, not several acknowledgements of success. This network snapshot completes the chapter’s progression from store, to guarded replication, to bounded redundancy: the TTL and replication limit must eventually stop active transmissions and retire copies that no longer improve the delivery objective.
Store
A node keeps messages locally because no continuous route is assumed. Buffer policy is part of the routing design, not an implementation detail.
Carry
Movement, schedules, patrols, buses, people, animals, or drones create future contact opportunities. Mobility is the transport path.
Forward
During a contact, nodes exchange summary vectors, request missing messages, and transfer copies that are still eligible to spread.
Routing doctrine: use epidemic routing when delivery is more important than conserving every byte, but only with explicit TTL, copy, buffer, priority, and cleanup limits.
13.5 Bound Flooding Before Fielding
A practical epidemic design needs a control record. Without it, each message can continue occupying buffers and airtime long after it has stopped being useful. The record should say which messages may replicate, how many copies are allowed, when stale copies expire, and which messages are dropped first when storage is tight.
Start the record at the contact exchange. Each node needs an inventory method, often called a summary vector or message manifest, that says which bundle or payload identifiers it already carries. The receiving node then requests only missing, still-eligible items. That step matters because a ten-second contact can be wasted by duplicate transfers if the nodes do not compare inventories before sending payload bytes.
Next, write the transfer order as an operator-visible rule rather than a hidden implementation guess. Emergency observations may go before routine logs; soon-expiring payloads may go before long-lived ones; large payloads may be deferred unless enough contact time remains. The rule should also define what happens when two limits conflict, such as a high-priority message that is already widely replicated or an old message that is the only copy left.
Before bound Flooding Before Fielding, inspect Figure to compare "Social Routing Performance Comparison" with "random basis". Their juxtaposition makes more copies usually improve delivery opportunity, but the benefit eventually flattens visible.
Read Figure from "Social Routing Performance Comparison" to "random basis". Taken together, "Social Routing Performance Comparison" and "random basis" express more copies usually improve delivery opportunity, but the benefit eventually flattens. For bound Flooding Before Fielding, the observed relationship between "Social Routing Performance Comparison" and "random basis" is evidence that "Social Routing Performance Comparison" carries into the next decision.
Before bound Flooding Before Fielding, inspect Figure to compare "less" with "expiry". Their juxtaposition makes replication overhead keeps rising even after delivery gains begin to flatten visible.
Read Figure from "less" to "expiry". Taken together, "less" and "expiry" express replication overhead keeps rising even after delivery gains begin to flatten. For bound Flooding Before Fielding, the observed relationship between "less" and "expiry" is evidence that "less" carries into the next decision.
Do not approve epidemic routing from a delivery-only simulation. The same run must report copy count, buffer occupancy, expired payloads, contact-window use, and energy-sensitive transmissions.
13.6 Copy Growth as Resource Model
Epidemic routing behaves like a resource amplifier. One message can become many stored copies. The upper bound is shaped by node count, contact pattern, TTL, copy budget, duplicate suppression, buffer policy, and delivery acknowledgements. This is why the routing decision must be evaluated as a storage, energy, and airtime decision.
At contact time the protocol is an anti-entropy exchange: two nodes compare message identifiers, calculate the set difference, then schedule transfers from the missing eligible set. The exact encoding can vary by implementation, but the state machine should be explicit: discover peer, exchange inventory, choose candidates, transfer payloads, update local metadata, and record partial-transfer failures. If any step is invisible in logs, field debugging quickly becomes guesswork.
Duplicate suppression is as important as replication. A node that receives a payload must record enough identity information to avoid accepting the same copy again under a different contact. A delivered-message acknowledgement or deletion signal can also spread through later contacts so carriers purge copies that no longer need to exist. If the system cannot propagate that cleanup state, the TTL and buffer-drop policy become the only brakes on copy growth.
The resource model should be calculated with worst plausible contact patterns, not only average behavior. High-contact carriers can become buffer hot spots because they meet many peers and receive many copies. Low-contact nodes can hold stale payloads until the TTL expires. A simulator acceptance run should therefore report per-node maximum buffer occupancy, copy count distribution, expired bytes, delivered bytes, contact utilization, and energy-sensitive transmissions, then compare pure epidemic routing with a bounded alternative such as Spray and Wait or PRoPHET-style probabilistic forwarding when overhead is too high.
Before copy Growth as Resource Model, inspect Figure to compare "Overhead: about 1000%" with "resources are secondary". Their juxtaposition makes epidemic routing is the high-replication end of a wider DTN strategy set visible.
Read Figure from "Overhead: about 1000%" to "resources are secondary". Taken together, "Overhead: about 1000%" and "resources are secondary" express epidemic routing is the high-replication end of a wider DTN strategy set. For copy Growth as Resource Model, the observed relationship between "Overhead: about 1000%" and "resources are secondary" is evidence that "Overhead: about 1000%" carries into the next decision.
Pure Epidemic
Every useful contact can create another copy. This is simple and robust, but it scales poorly unless TTL and buffer policy are strict.
Spray And Wait
The source or early carriers distribute a fixed number of copy tickets, then carriers wait for direct delivery or a configured forwarding rule.
Context-Aware Forwarding
History, social contact, schedule, destination likelihood, or priority can decide which contacts deserve a copy.
Review formula: worst-case storage pressure grows with messages created during the TTL window, average copy count, payload size, and how unevenly copies land on high-contact nodes. If this number is not bounded, the routing design is not ready.
13.7 Stop Epidemic Copies After Delivery
A wildlife collar creates message M42 where no base station is reachable. Figure 13.1 follows M42 from its first stored copy through opportunistic contacts, and Figure 13.3 distinguishes delivered, carrying, and unaware nodes. The replica charts show the benefit and cost together: more carriers improve contact chances but consume storage, airtime, and energy.
Starting from one carrier, ideal pairwise spreading can grow as 1, 2, 4, and 8 copies across contact rounds. After three doublings, eight stored copies exist for one payload. A delivery receipt, time-to-live, or copy limit must stop later exchanges; otherwise nodes keep spending DTN resources on M42 after the destination already has it.
13.7.1 Predict the Epidemic Contact
- Predict: Two relays compare summaries and both already list M42. Should they send the payload again? Check: No. The summary exchange should suppress that duplicate DTN transfer.
- Predict: A short time-to-live expires before the next vehicle contact. What trade-off was chosen? Check: Storage and stale-message cost fell, but the probability of eventual epidemic delivery also fell.
13.8 Summary
Epidemic routing improves delivery opportunity in delay-tolerant networks by copying messages during opportunistic contacts. It is useful when connectivity is intermittent and delivery matters more than minimal overhead. It is dangerous when treated as free flooding. A defensible design records summary-vector behavior, TTL, copy budgets, buffer drop rules, contact-window priority, and delivery-versus-overhead evidence before field deployment.
13.9 Key Takeaway
Use epidemic routing as a bounded DTN delivery strategy, not as unbounded flooding: every copy must have a lifetime, a storage budget, and a reason to exist.
13.10 See Also
Review store-carry-forward behavior before choosing a replication strategy.
Compare epidemic flooding with forwarding that uses contact history or social utility.
Place epidemic routing in field scenarios where contacts are delayed or scheduled.
Connect routing choice to deployment evidence, ownership, and retest triggers.
