2.1 Spotlight: Consistent Hashing Router
A new router uses consistent hashing to select a connection based on the sent message.
ConsistentHashingRouter maps messages with same hash to the same routee, as far as possible. It means that when a routee is added, it takes its share of elements from the other routees and when it is removed, its elements are shared between the remaining routees. This can be very useful together with the new cluster aware routers.
Read more in the docs for Scala or in the docs for Java.
2.1 Spotlight: Cluster Aware Routers
A simple way to scale out on multiple machines is to use cluster aware routers. Add a new node to the cluster and it will automatically participate as a worker. Later you can shut down the node and it will be removed from the router.
All previously existing routers, such as round-robin and random router, can be made aware of member nodes in the cluster, with a small configuration addition.
Read more in the docs for Scala or in the docs for Java.
2.1 Spotlight: Cluster Death Watch
The nodes in the cluster monitor each other by sending heartbeats to detect if a node is unreachable from the rest of the cluster. This failure detection is hooked in to the ordinary death watch, i.e. a Terminated message is delivered not only in the case of graceful termination of watched actor but also in the case of network failure or JVM crash.
Read more in the docs for Scala or in the docs for Java.
2.1 Spotlight: Cluster Membership
Akka cluster is a decentralized peer-to-peer cluster with no single point of failure or single point of bottleneck. Cluster membership is communicated between nodes using a Gossip Protocol. You can listen to membership changes by registering an ordinary actor as subscriber. It will be notified with a message when for example a new member joins the cluster.
Read more in the docs for Scala or in the docs for Java. Cluster membership is released as an experimental module in Akka 2.1.
2.1 Spotlight: Circuit Breaker
Circuit Breaker is a pattern described by Michael Nygard. It is used to provide stability and prevent cascading failures in distributed systems. Akka 2.1 includes an implementation of a Circuit Breaker that supports asynchronous calls.
Read more in the docs.
2.1 Spotlight: Shiny New Actor DSL
Since Akka actors are gradually replacing the old Scala actors, Martin Odersky asked for some nice sugar on top of the usual ways to create actors in Akka, and he got it:
All this magic (and more) is enabled by the single import at the top. Read more in the docs.