Skip to content

Memory and CPU state keyed by connectionId instead of nodeId #464

Open

Description

@ravjotbrar

Description

Memory and CPU usage data is fetched from the metrics server (which is keyed by nodeId ). However, the server sends it back to the frontend tagged with connectionId, and the frontend stores it per-connection.

This means if two connections exist to the same node on different databases, they each store a duplicate copy of the same memory/CPU data. It's also inconsistent with how hot keys, big keys, command logs, and monitor are stored (by clusterId or nodeId).

Expected

Memory and CPU state should be keyed by nodeId to match the other metrics features and reflect that this data is node-level, not database-level.

Impact

Duplicate data in state for multi-db connections to the same node. Also a conceptual inconsistency that makes the codebase harder to reason about for new contributors.

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/frontendUI components, state, routingarea/serverBackend, WebSocket, actions

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions