8 Clustering
This chapter covers
- Forming a cluster
- Cluster monitoring
- Building a clustered Akka app
An Akka cluster is a group of nodes that communicate peer-to-peer to form a whole. These nodes are ActorSystem
s that live in independent JVMs. Thanks to its decentralized structure, a cluster has no single point of failure, is fault-tolerant and can dynamically increase and decrease the number of nodes.
Distributed applications run in environments that are not fully under our control, such as cloud computing platforms or remote data centers. The larger the cluster, the greater the ability to distribute the load, but the greater the risk of failure. In the event of this inevitable failure, Akka offers clustering and many extensions that provide solutions to common needs that have been raised over the years. One of these requirements is the means to monitor and change the state of the cluster nodes.
Akka Cluster give raise to multiple tools. You will learn about the first two in this chapter; for the others, it may be useful to know that they are available when you need them.