Glossary · System coordination, integration and orchestration
Total ordering
Also known as: Total order, Total order broadcast
German: Totale Ordnung
In distributed systems, total ordering is the guarantee that all nodes see and process a set of events or messages in the same order, so that replicas that apply them reach the same state.
- System integration
In one sentence
Total ordering guarantees that all nodes see and process events or messages in the same order, so replicas reach the same state.
Example
A replicated recipe management service uses a totally ordered log, so every node applies the recipe changes in exactly the same order.
How it applies
- Engineering: Total ordering is typically achieved through a single sequencer, a consensus protocol or a replicated log. It is a basis for state machine replication and strong consistency.
- Trade-offs: Establishing a total order costs latency and depends on coordination between nodes. Many applications only need causal or per-source ordering, which is cheaper.
- Messaging: Message brokers usually guarantee order only within a partition, queue or topic, not across them. Don't assume global order unless the platform guarantees it.
- Documentation: State the ordering guarantees of interfaces and event streams explicitly in the interface specification, so consumers know whether they must handle out-of-order events.
Total ordering vs. timestamp ordering
Sorting events by timestamp gives an order only as good as the clocks; with clock skew, events can be ordered wrongly and ties are possible. Total ordering protocols give a consistent order independent of clock accuracy. Vector clocks capture causal order but not a total order.