Skip to content

Cluster Topology: address #474 review comments on memory basis and failover roles, plus node row UI updates #514

Description

@nassery318

Two review comments from @sarthakaggarwal97 in discussion #474, plus some frontend UI updates to the Cluster Topology view (#395).

1. Don't use total_system_memory as capacity

  • Only count memory toward utilization when the node has maxmemory set.
  • Cluster Memory card: show for capacity when any node has no maxmemory, instead of adding host RAM to the total.
  • Nodes without maxmemory keep their host-RAM percentage in the tooltip, marked as not counted, with a dashed badge. They no longer count toward the High badge or "Nodes
    Flagged".

2. Keep node roles in sync after a failover

  • Re-read the cluster topology (CLUSTER SLOTS) on each 5s poll and send it with the cluster data, so primaries and replicas regroup after a failover.
  • When the topology changes, update the server's node registry and reconcile metrics servers.

3. Frontend UI updates

  • Show host:port as the node row label instead of server_name, and drop the separate host:port line.
  • Replica rows use a smaller label than primary rows.
  • Remove server_name from node search and update the search placeholder to "Search nodes by host or port...".

Why?

  • Memory: If several nodes share a host, adding total_system_memory for each one counts the same RAM more than once. That inflates cluster capacity and flags nodes as High against a limit they don't have.
  • Failover: Roles are fixed at connect time. After a failover, the demoted node keeps its PRIMARY label and the promoted node stays a REPLICA, which hides its metrics and leaves it out of "Nodes Flagged".
  • Node rows: host:port identifies a node in the cluster without ambiguity, and it matches how nodes are addressed everywhere else in the view.

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions