pekko/docs/src/main/paradox/cluster-dc.md
Jonas Chapuis 3d93c29737
Renames in doc #98 (#100)
* Rename some base_url values in Paradox.scala
* Rename Akka to Pekko in documentation, also adapt/remove small blocks of text that were no longer consistent or adequate
* Rename Akka to Pekko in some related files outside the doc directory
* Rename akka-bom to pekko-bom
* Rename artifacts prefixes from akka to pekko
* Add links to Apache documents in licenses.md
* Add links to Akka migration guides for earlier versions
2023-01-18 08:13:01 +01:00

1.9 KiB

Classic Multi-DC Cluster

This chapter describes how @refPekko Cluster can be used across multiple data centers, availability zones or regions.

For the full documentation of this feature and for new projects see @ref:Multi-DC Cluster.

Membership

You can retrieve information about what data center a member belongs to:

Scala
@@snip ClusterDocSpec.scala { #dcAccess }
Java
@@snip ClusterDocTest.java { #dcAccess }

For the full documentation of this feature and for new projects see @ref:Multi-DC Cluster.

Cluster Singleton

This is how to create a singleton proxy for a specific data center:

Scala
@@snip ClusterSingletonManagerSpec.scala { #create-singleton-proxy-dc }
Java
@@snip ClusterSingletonManagerTest.java { #create-singleton-proxy-dc }

If using the own data center as the withDataCenter parameter that would be a proxy for the singleton in the own data center, which is also the default if withDataCenter is not given.

For the full documentation of this feature and for new projects see @ref:Multi-DC Cluster.

Cluster Sharding

This is how to create a sharding proxy for a specific data center:

Scala
@@snip ClusterShardingSpec.scala { #proxy-dc }
Java
@@snip ClusterShardingTest.java { #proxy-dc }

For the full documentation of this feature and for new projects see @ref:Multi-DC Cluster.