Question 11 of 11 · PYQ 2025 · 6 marks
Open in ChatGPTDescribe various approaches to implement reliable multicast.
Introduction
Multicast sends one message to a group. An unreliable multicast (IP multicast) can lose it. Reliable multicast guarantees that every correct member of the group eventually receives every message, and the approaches differ in how they detect the loss and who repairs it.
The guarantee
For every message sent to the group:
- Integrity: no member receives a corrupted copy.
- Validity: a correct sender never delivers a forged message.
- Agreement: every correct member delivers the same messages.
- Termination: no message is delivered twice (at-most-once), or every message is delivered (at-least-once).
The delivery order is a separate guarantee: FIFO, causal or total.
Approaches
- Positive acknowledgement (ACK). Every receiver acknowledges every message; the sender retransmits to those that did not. Problem: an ACK storm: n receivers times m messages.
- Negative acknowledgement (NAK). Receivers report only missing sequence numbers, and the sender retransmits. Problem: one lost packet makes many receivers send a NAK at once (implosion), damped by a random back-off.
- Ring-based. The message and its ACKs travel round a logical ring; each member acknowledges its predecessor, so the number of ACKs is bounded. Failure of a ring member must be repaired.
- Tree-based (hierarchical). ACKs are aggregated up a tree of subgroups, so the root sees one ACK per subtree instead of per member. This is how IP multicast reliability is often implemented.
- Sender-based with a retransmission buffer. The sender keeps a window of messages, and any NAK is answered from the window.
- Erasure coding / FEC. Extra parity packets are sent so a receiver can reconstruct a lost one without asking. Used for large fan-out where a retransmission round is too slow.
Atomic multicast
For replication, reliable is not enough: all members must deliver in the same order.
- Sequencer: one process assigns a sequence number to every message; members deliver in that order.
- Fixed sequencer with a ring: the token carrying the sequence number circulates.
- Consensus: Raft or Paxos agrees on the order, which is what ZooKeeper's atomic broadcast does.
Diagram
Trade-offs
| Approach | Messages | Failure behaviour |
|---|---|---|
| ACK per receiver | O(n·m) | Sender is a bottleneck |
| NAK | O(n) + retransmits | NAK implosion, needs damping |
| Ring | 2n per message | Ring must be repaired |
| Tree | O(log n) per message | Tree repair on failure |
| FEC | Extra bandwidth | No repair round |
Conclusion
Reliable multicast is the choice between who notices a loss and who repairs it. NAK-based tree multicast scales furthest because losses are rare and repairs are local; total order adds a sequencer or consensus on top.