Document HOTKEYS hot key detection command (GET/RESET) - #460
Open
alon-arenberg wants to merge 3 commits into
Open
Document HOTKEYS hot key detection command (GET/RESET)#460alon-arenberg wants to merge 3 commits into
alon-arenberg wants to merge 3 commits into
Conversation
Signed-off-by: Alon Arenberg <alonare@amazon.com>
Signed-off-by: Alon Arenberg <alonare@amazon.com>
Signed-off-by: Alon Arenberg <alonare@amazon.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Document the HOTKEYS command (server-side hot key detection)
Documentation for the server-side hot key detection feature added in
valkey-io/valkey#3708.
Hot key detection samples client key accesses and maintains an approximate
top-K of the most frequently accessed keys (Space-Saving algorithm) over a
fixed, frozen reporting window, surfaced through a new
HOTKEYScontainercommand.
What's included
Command pages:
commands/hotkeys.md— container overview: what hot key detection does,that it is disabled by default, and how to enable it (
hotkey-top-kset to apositive value;
0disables).commands/hotkeys-get.md—HOTKEYS GET: returns the hottest keys from thelast completed window ordered by estimated QPS (descending); documents the
key/db/qpsfields and the QPS estimate, the frozen-window semantics(empty until the first window completes), the
hotkey-top-kcap, and theRENAME/MOVE/SWAPDB stale-attribution behavior.
commands/hotkeys-reset.md—HOTKEYS RESET: clears the live and frozenwindows.
Reply metadata:
resp2_replies.json/resp3_replies.json— reply descriptions forHOTKEYS,HOTKEYS GET, andHOTKEYS RESET.HOTKEYS GETreturns an arrayof entries (RESP3: each entry is a map with
key,db,qps; RESP2: theequivalent flat field/value array), ordered by QPS descending.
Related
needs-doc-prlabel on that PR.Notes
The command metadata (arity, args, flags) is generated from the command JSON in
the main repo, so this PR only adds the human-readable pages and reply
descriptions.