Skip to content

[NEW] Introduce slot level metrics to Valkey clusterΒ #20

Closed

Description

@PingXie

I’m revisiting the feature proposal we discussed in redis/redis#10472, which aims at providing metrics at the slot level. Despite the substantial effort and detailed discussions back then, we didn’t land this feature. I believe it’s worth reconsidering, given the potential benefits and previous interest.

@kyle-yh-kim @zuiderkwast @madolson

Activity

  1. madolson commented on Mar 25, 2024

    @madolson
    Member

    I fully agree!

  2. madolson commented on Mar 25, 2024

    @madolson
    Member

    I've also re-added my favorite creature comfort. @placeholderkv/core-team thoughts?

  3. zuiderkwast commented on Mar 25, 2024

    @zuiderkwast
    Contributor

    Sure, metrics seem fine. I don't have strong opinions about it, only that I think fixing the cluster consistency problems is more important than metrics.

  4. zuiderkwast commented on Mar 25, 2024

    @zuiderkwast
    Contributor
  5. madolson commented on Mar 25, 2024

    @madolson
    Member

    I think our big initial play should be cluster overhaul. I think a lot of us want it, and it makes the most compelling sense as the big "next major features".

  6. kyle-yh-kim commented on Mar 26, 2024

    @kyle-yh-kim
    Contributor

    Good to hear back on this thread, hope you all have been doing well.

    Where we left-off

    In total, there were 3 proposed metrics under CLUSTER SLOT-STATS command group;

    1. key_count
    2. cpu_usec
    3. memory_bytes

    Next steps

    memory_bytes is the most complex of all, but this shouldn't stop us from implementing the first two metrics to gain some momentum.

    I will open two PRs for key_count and cpu_usec in the coming days. These PRs will be based off of the already existing PRs for key_count and cpu_usec under Redis repository.

    As for CLUSTER SLOT-STATS command format, below was the latest development we agreed upon. Lengthy discussion and rationale can be found here and here.

    CLUSTER SLOT-STATS
    [SLOTSRANGE start-slot end-slot [start-slot end-slot ...]]|
    [ORDERBY column [LIMIT limit] [ASC|DESC]]
    
  7. hwware commented on Mar 27, 2024

    @hwware
    Contributor

    It is great, and I prefer to add this feature in CLUSTER INFO.

  8. madolson commented on Mar 27, 2024

    @madolson
    Member

    It is great, and I prefer to add this feature in CLUSTER INFO.

    Why cluster info? It's a free form field I guess, it could be a new sub info field I suppose

  9. kyle-yh-kim commented on Mar 28, 2024

    @kyle-yh-kim
    Contributor

    Thanks for chiming in. Personally, I'm opposed to CLUSTER INFO. We could perhaps add aggregated information under CLUSTER INFO, but not for the slot level metrics themselves.

    Imagine dumping ~16384 slot level metrics under CLUSTER INFO. This would unnecessarily bloat the info string, when the user may have only wanted to check cluster_state:ok.

    A new command dedicated for slot level metrics querying, in this case, CLUSTER SLOT-STATS, is more suitable. For reference, below was the latest command format we agreed on.

    CLUSTER SLOT-STATS
    [SLOTSRANGE start-slot end-slot [start-slot end-slot ...]]|
    [ORDERBY column [LIMIT limit] [ASC|DESC]]
    

    I'll wait for the core team to finalize this decision, before opening the PRs.

  10. zuiderkwast commented on Apr 15, 2024

    @zuiderkwast
    Contributor

    @kyle-yh-kim Yeah CLUSTER SLOT-STATS. We're a bit overloaded with the forking stuff, new core team, new project, etc. but I think we want this for our next release. There was already a lot of review done and I think it was almost ready to merge. Do you want to bring over your PR?

  11. moved this to Todo in Valkey 8.0on Apr 15, 2024
  12. changed the title [-]Introduce slot level metrics to Redis cluster[/-] [+][NEW] Introduce slot level metrics to Redis cluster[/+] on Apr 20, 2024
  13. 65 remaining items

  14. madolson commented on Jul 26, 2024

    @madolson
    Member

    The four components for Valkey 8.0 are now merged. We will follow up with memory in Valkey 8.2.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions