You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Brad Schoening (Jira)" <ji...@apache.org> on 2026/10/21 20:31:00 UTC
[jira] [Commented] (CASSANDRA-21770) Add node-centric interface for identifying replica peers
[ https://issues.apache.org/jira/browse/CASSANDRA-21770?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18129843#comment-18129843 ]
Brad Schoening commented on CASSANDRA-21770:
--------------------------------------------
Please see {{[CASSANDRA-17665|https://issues.apache.org/jira/browse/CASSANDRA-17665] Add nodetool getreplicas}}
> Add node-centric interface for identifying replica peers
> --------------------------------------------------------
>
> Key: CASSANDRA-21770
> URL: https://issues.apache.org/jira/browse/CASSANDRA-21770
> Project: Apache Cassandra
> Issue Type: Improvement
> Components: Feature/Virtual Tables, Tool/nodetool
> Reporter: n.v.harikrishna
> Assignee: n.v.harikrishna
> Priority: Normal
> Fix For: 6.x, 7.x
>
> Attachments: ci_summary.html
>
>
> *Problem*
>
> Operators often need to bounce, upgrade or replace nodes one after another. To keep data available, they must not take down a node and the nodes that hold copies of the same data (its replica peers) at the same time.
>
> The tools Cassandra has today, such as nodetool describering and nodetool getendpoints, are range-centric or key-centric. They answer "which nodes own this range or key?" Operators need the node-centric answer: "which nodes share data with this node?" To get it now, they have to put it together themselves from token ranges, keyspaces and replication settings. This is slow and easy to get wrong, especially while nodes are joining or leaving the cluster.
>
> *Proposed solution*
>
> Add a node-centric view of replica peers: for each node, list the other nodes that share at least one token range with it. Peers are grouped by datacenter. Reads and writes are listed separately, because they can differ while nodes are joining or leaving. The data comes from the cluster metadata. This view is exposed through:
> - A new nodetool command: _nodetool placement peers_. It can filter by node (-n), datacenter (-dc) and keyspace (-k / -x). It prints YAML or JSON.
> - A new JMX operation in StorageServiceMBean.
> - A new virtual table, _system_views.replica_peers_, which shows the peers of the local node.
> _Sample output:_
> {noformat}
> $ nodetool placement peers
> version: 0
> format_version: 1
> epoch: 9
> keyspaces: [ks1, system_auth, system_cluster_metadata, system_distributed, system_traces]
> endpoints: {1: '127.0.0.1:7005', 2: '127.0.0.3:7005', 3: '127.0.0.2:7005'}
> peers: 1:
> read: datacenter1: [2, 3]
> write: datacenter1: [2, 3]
> 2:
> read: datacenter1: [1, 3]
> write: datacenter1: [1, 3]
> 3:
> read: datacenter1: [1, 2]
> write: datacenter1: [1, 2]
> catch_up: SKIPPED
> cms: INITIALIZED
> queried_from: 127.0.0.1:7005
> {noformat}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org