Skip to content

feat(bigkeys): add slot heatmap for cluster mode - #563

Open
RajGahoi wants to merge 1 commit into
valkey-io:mainfrom
RajGahoi:feat/bigkeys-slot-heatmap
Open

RajGahoi wants to merge 1 commit into
valkey-io:mainfrom
RajGahoi:feat/bigkeys-slot-heatmap

Conversation

@RajGahoi

Copy link
Copy Markdown
Contributor

Description

Closes #540

Adds a Slot Heatmap to Big Keys in cluster mode, allowing users to inspect memory skew and key concentration across hash slots:

  • Implements \keyHashSlot\ in \�alkey-common\ with Valkey/Redis CRC16 polynomial and full cluster hash-tag ({tenant}:*) support matching \CLUSTER KEYSLOT.
  • Enriches \BigKey\ records with \slotId\ across server aggregation actions and frontend state slice.
  • Implements \BigKeysSlotHeatmap\ with:
    • Heatmap grid colored by big-key count using the existing heatmap ratio scale and multi-bucket legend.
    • Hover tooltip with Slot ID, big-key count, total memory footprint, and owning node.
    • Selection panel with detailed table of slot keys (name, type, size, TTL).
    • Node filter dropdown to narrow tiles to specific cluster nodes.
  • Integrates a tabbed view into \BigKeysDistributionModal\ allowing users to switch between Nodes (bar chart) and Slots (heatmap).

Testing

  • Unit tests added in \common/src/tests/hash-slot.test.ts\ for key slot hashing, hash-tags, and edge cases.
  • Unit tests added in \�pps/frontend/src/components/activity-view/bigkeys/tests/big-keys-slot-heatmap.test.tsx\ for heatmap rendering and slot inspection.
  • All unit tests and linters passing clean across \�alkey-common, \�pps/server, and \�pps/frontend.

Signed-off-by: Raj Gahoi gahoiraj01@gmail.com

Adds cluster slot heatmap to Big Keys view, grouping big keys by Valkey CRC16 key hash slots with slot selection, size metrics, node filtering and key inspection.

- Implements keyHashSlot with cluster hash-tag support in valkey-common
- Enriches BigKey with slotId on server action and frontend slice
- Implements BigKeysSlotHeatmap with multi-bucket legend and node dropdown
- Integrates tabbed distribution modal ('Nodes' vs 'Slots')
- Adds unit tests for keyHashSlot and BigKeysSlotHeatmap

Closes valkey-io#540

Signed-off-by: Raj Gahoi <gahoiraj01@gmail.com>
@coderabbitai

coderabbitai Bot commented Oct 16, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 15 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 2 included reviews currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 332568cf-b60c-4f49-bcd9-f602d2c341b5
📥 Commits

Reviewing files that changed from the base of the PR and between 0161e2a and a8bdf61.

📒 Files selected for processing: 10
  • apps/frontend/src/components/activity-view/ActivityView.tsx
  • apps/frontend/src/components/activity-view/bigkeys/__tests__/big-keys-slot-heatmap.test.tsx
  • apps/frontend/src/components/activity-view/bigkeys/big-keys-distribution.tsx
  • apps/frontend/src/components/activity-view/bigkeys/big-keys-slot-heatmap.tsx
  • apps/frontend/src/components/activity-view/bigkeys/big-keys.tsx
  • apps/frontend/src/state/valkey-features/bigkeys/bigKeysSlice.ts
  • apps/server/src/actions/bigkeys.ts
  • common/src/__tests__/hash-slot.test.ts
  • common/src/hash-slot.ts
  • common/src/index.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added area/frontend UI components, state, routing area/server Backend, WebSocket, actions labels Oct 16, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/frontend UI components, state, routing area/server Backend, WebSocket, actions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Big Keys: slot heatmap for cluster mode

1 participant