Memory and CPU state keyed by connectionId instead of nodeId

Open Beginner friendly
#464 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
68/100
Issue type
Refactor
Clarity
Mostly clear
Activity status
Quiet
Tech stack
typescript

Research direction

Trace the frontend memory and CPU metrics state from the metrics server response, focusing on where connectionId is used as the key. Compare that handling with the existing hot keys, big keys, command logs, and monitor state, then verify that two database connections to one node share a single nodeId-keyed copy.

Written by the indexing model from the issue text.

Description

area/frontend area/server

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.

Dominant language
TypeScript
Stars
143
Forks
29
Avg merge
1d 17h
Merged PRs (30d)
18

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from valkey-io/valkey-admin

All issues in valkey-io/valkey-admin

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.