In fault-tolerant distributed computing, an atomic broadcast or total order broadcast is a broadcast where all correct processes in a system of multiple processes deliver the same set of messages in the same order; that is, the same sequence of messages. The broadcast is termed "atomic" because it either eventually completes correctly at all participants, or all participants abort without side effects. Atomic broadcasts are an important distributed computing primitive.
The following properties are usually required from an atomic broadcast protocol:
- Validity: if a correct participant broadcasts a message, then all correct participants will eventually deliver it.
- Uniform Agreement: if one correct participant delivers a message, then all correct participants will eventually deliver that message.
- Uniform Integrity: a message is delivered by each participant at most once, and only if it was previously broadcast.
- Uniform Total Order: the messages are totally ordered in the mathematical sense; that is, if any correct participant delivers message 1 first and message 2 second, then every other correct participant must deliver message 1 before message 2.
Note that total order is not equivalent to FIFO order, which requires that if a process sent message 1 before it sent message 2, then all participants must deliver message 1 before delivering message 2. It is also not equivalent to "causal order", where message 2 "depends on" or "occurs after" message 1 then all participants must deliver message 2 after delivering message 1. While a strong and useful condition, total order requires only that all participants deliver the messages in the same order, but does not place other constraints on that order.
Designing an algorithm for atomic broadcasts is relatively easy if it can be assumed that computers will not fail. For example, if there are no failures, atomic broadcast can be achieved simply by having all participants communicate with one "leader" which determines the order of the messages, with the other participants following the leader.
However, real computers are faulty; they fail and recover from failure at unpredictable, possibly inopportune, times. For example, in the follow-the-leader algorithm, what if the leader fails at the wrong time? In such an environment achieving atomic broadcasts is difficult. A number of protocols have been proposed for performing atomic broadcast, under various assumptions about the network, failure models, availability of hardware support for multicast, and so forth.
Equivalent to Consensus
In order for the conditions for atomic broadcast to be satisfied, the participants must effectively "agree" on the order of delivery of the messages. Participants recovering from failure, after the other participants have "agreed" an order and started to deliver the messages, must be able to learn and comply with the agreed order. Such considerations indicate that in systems with crash failures, atomic broadcast and consensus are equivalent problems.
A value can be proposed by a process for consensus by atomically broadcasting it, and a process can decide a value by selecting the value of the first message which it atomically delivers. Thus, consensus can be reduced to atomic broadcast.
Conversely, a group of participants can atomically broadcast messages by achieving consensus regarding the first message to be delivered, followed by achieving consensus on the next message, and so forth until all the messages have been delivered. Thus, atomic broadcast reduces to consensus. This was demonstrated more formally and in greater detail by Xavier Défago, et. al.
A fundamental result in distributed computing is that achieving consensus in asynchronous systems in which even one crash failure can occur is impossible in the most general case. This was shown in 1985 by Michael J. Fischer, Nancy Lynch, and Mike Paterson, and is sometimes called the FLP result. Since consensus and atomic broadcast are equivalent, FLP applies also to atomic broadcast. The FLP result does not prohibit the implementation of atomic broadcast in practice, but it does require making less stringent assumptions than FLP in some respect, such as about processor and communication timings.
The Zookeeper Atomic Broadcast (ZAB) protocol is the basic building block for Apache ZooKeeper, a fault-tolerant distributed coordination service which underpins Hadoop and many other important distributed systems.
Ken Birman has proposed the virtual synchrony execution model for distributed systems, the idea of which is that all processes observe the same events in the same order. A total ordering of the messages being delivered, as in atomic broadcast, is one (though not the only) method for attaining virtually synchronous message delivery.
- Kshemkalyani, Ajay; Singhal, Mukesh (2008). Distributed Computing: Principles, Algorithms, and Systems (Google eBook). Cambridge University Press. pp. 583–585. ISBN 9781139470315.
- Défago, X., Schiper, A., and Urbán, P. 2004. Total order broadcast and multicast algorithms: Taxonomy and survey. ACM Comput. Surv. 36, 4 (Dec. 2004), 372-421. DOI=10.1145/1041680.1041682 (alternate source)
- Rodrigues L, Raynal M.: Atomic Broadcast in Asynchronous Crash-Recovery Distributed Systems , ICDCS '00: Proceedings of The 20th International Conference on Distributed Computing Systems ( ICDCS 2000)
- Ekwall, R.; Schiper, A.: Solving Atomic Broadcast with Indirect Consensus. Dependable Systems and Networks, 2006. DSN 2006. International Conference on 2006.
- Dermot Kelly. "Group Communication".
- Chandra and Toueg. Unreliable failure detectors for reliable distributed systems. JACM 43(2):225–267, 1996.
- Michael J. Fischer, Nancy A. Lynch, and Michael S. Paterson. "Impossibility of Distributed Consensus with One Faulty Process" (PDF).
- Flavio P. Junqueira, Benjamin C. Reed, and Marco Serafini, Yahoo! Research. "Zab: High-performance broadcast for primary-backup systems" (PDF).
- André Medeiros (March 20, 2012). "ZooKeeper's atomic broadcast protocol: Theory and practice" (PDF). Helsinki University of Technology - Laboratory of Theoretical Computer Science.