Skip navigation links

Package io.aeron.cluster

Aeron Cluster provides support for fault-tolerant services as replicated state machines based on the Raft consensus algorithm.

See: Description

Package io.aeron.cluster Description

Aeron Cluster provides support for fault-tolerant services as replicated state machines based on the Raft consensus algorithm.

The purpose of Aeron Cluster is to aggregate and sequence streams from cluster clients into a single log. A number of nodes will replicate and archive the log to achieve fault tolerance. ClusteredServices deterministically process the log and respond to cluster clients.

Aeron Cluster works on the concept of a strong leader using an adaptation of the Raft algorithm. The leader sequences the log and is responsible for replicating it to other cluster members known as followers.

A number of components make up Aeron Cluster. Central is the ConsensusModule which sequences the log and coordinates consensus for the recording of the sequenced log to persistent storage, and the services consuming the log across cluster members. Aeron Archive records the log to durable storage. Services consume the log once a majority of the cluster members have safely recorded the log to durable storage.

To enable fast recovery, the services and consensus module can take a snapshot of their state as of a given log position thus enabling recovery by loading the most recent snapshot and replaying logs from that point forward. Snapshots are recorded as streams in the Archive for local and remote replay so that a distributed file system is not required.

Usage

The cluster can run in various configurations:

The majority of cluster members determine consensus. Clusters should typically be 3 or 5 in population size. However, 2 node clusters are supported whereby both members must agree the log and in the event of failure the remaining member must be manually reconfigured as a single node cluster to progress.

Protocol

Messages are specified using SBE in this schema aeron-cluster-codecs.xml
Skip navigation links

Copyright © 2014-2023 Real Logic Limited. All Rights Reserved.