Skip to content

Expose shard count via cluster status API #204

Description

@kriszyp

Request

When managing a sharded cluster across multiple environments, there is no easy programmatic way to determine how many shards are configured in a replica set. The shard count should be exposed through the cluster status API.

Current state

clusterStatus exposes a shard field per-node (the shard index for that node), and internally knownNodes.ts builds a server.shards Map with all shard→node mappings. However, aggregate shard count is not surfaced in any API response.

Proposed

Add shardCount (or numberOfShards) to the cluster/replication status response so consumers can easily determine topology without counting individual node shard fields themselves.

🤖 Filed by Claude on behalf of Kris.

Activity

  1. added
    enhancementNew feature or request
    from-jiraMigrated or originated from a Jira ticket
    area:clusteringClustering, sharding, replication topology
    on May 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:clusteringClustering, sharding, replication topologyenhancementNew feature or requestfrom-jiraMigrated or originated from a Jira ticket

    Type

    No type

    Fields

    Priority

    P2

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions