NetworkTopologyStrategy
NetworkTopologyStrategy is a replication strategy used by Apache Cassandra for distributing data across multiple data centers (and racks). It allows per-data-center replication factors, enabling replicas to be allocated independently in each data center, rather than applying a single global factor.
Usage: When creating a keyspace, specify options like {'class': 'NetworkTopologyStrategy', 'DC1': '3', 'DC2': '2'}, where DC1
Requirements: A network topology-aware snitch (for example GossipingPropertyFileSnitch) must be configured so the system can identify
Notes: You can only specify replication factors for data centers that exist in the cluster; if you
Comparison: Unlike SimpleStrategy, which uses a single replication factor across all nodes, NetworkTopologyStrategy distributes replicas per
See also: Apache Cassandra, Replication, Data center, Snitch.