Repository navigation
INFO Command Optimization and INFO.SHARD Introduction - #42153
Merged
mattklein123 merged 9 commits intoDec 8, 2025
Merged
mattklein123 merged 9 commits into
mattklein123 merged 9 commits into
Conversation
dinesh-murugiah
force-pushed
the
clusterscope_commands_addition
branch
from
November 20, 2025 15:02
17f97f9 to
6b1ad4a
Compare
Contributor
Author
|
@mattklein123 @yanavlasov Request review |
mattklein123
requested changes
Nov 27, 2025
mattklein123
left a comment
Member
There was a problem hiding this comment.
Thanks leaving some comments from a first skim.
/wait
Signed-off-by: dinesh-murugiah <[email protected]>
Signed-off-by: dinesh-murugiah <[email protected]>
Signed-off-by: dinesh-murugiah <[email protected]>
…ler.cc Signed-off-by: dinesh-murugiah <[email protected]>
Signed-off-by: dinesh-murugiah <[email protected]>
Signed-off-by: dinesh-murugiah <[email protected]>
Signed-off-by: dinesh-murugiah <[email protected]>
Signed-off-by: dinesh-murugiah <[email protected]>
dinesh-murugiah
force-pushed
the
clusterscope_commands_addition
branch
from
December 2, 2025 12:53
91b3a9c to
c4daad0
Compare
Contributor
Author
|
@mattklein123 sorry for the delay , my laptop got broken , took some to setup back and continue |
Signed-off-by: dinesh-murugiah <[email protected]>
dinesh-murugiah
force-pushed
the
clusterscope_commands_addition
branch
from
December 2, 2025 14:31
8cd05c8 to
41d06a2
Compare
Contributor
Author
|
@mattklein123 kind reminder |
mattklein123
approved these changes
Dec 8, 2025
grnmeira
pushed a commit
to grnmeira/envoy
that referenced
this pull request
Mar 20, 2026
Signed-off-by: dinesh-murugiah <[email protected]> Signed-off-by: Gustavo <[email protected]>
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.
INFO Command Optimisation and INFO.SHARD Introduction
Problem Statement
The previous implementation of the INFO command collected responses from ALL shards and concatenated them into a single massive response. This approach had several critical issues:
Network Overhead: Clients using INFO for health checks (e.g., Spring Data Redis) received unnecessarily large responses, wasting network bandwidth
Memory Pressure: Large concatenated responses consumed excessive buffer space, especially in clusters with many shards
Performance Impact: Health check operations became expensive, affecting overall system responsiveness
Poor Scalability: The problem worsened as cluster size increased
Solution:
We've redesigned the INFO command implementation by splitting it into two distinct commands:
1. INFO Command (Cluster-Scope with Aggregation)
Purpose: Provides a concise, consolidated view of the entire cluster
Behaviour: Aggregates metrics across all shards intelligently using different strategies (Sum, Max, First, etc.)
Returns a single, compact response representing cluster-wide statistics
Supports optional section parameter: [INFO [section]]to filter output (e.g., INFO server, INFO stats)
Benefits: Minimal network bandwidth, efficient health checking, consolidated cluster view, Ideal for health checks and monitoring dashboards
2. INFO.SHARD Command (Single-Shard Query)
Purpose: Retrieves complete INFO metrics from a specific shard
Syntax: [INFO.SHARD <shard_id> [section]]
[shard_id]: Numeric shard index (0, 1, 2, ...)
[section]: Optional parameter to filter by section (e.g., server, memory, stats)
Behavior: Queries only the specified shard and returns its full INFO response
Use Cases:
Debugging individual shard issues
Detailed shard-level diagnostics
Troubleshooting performance problems on specific shards
Benefits: Targeted queries, no bandwidth waste, precise debugging capability
Technical Implementation
Core Changes
Aggregation Handler (InfoCmdAggregateResponseHandler)
Implements metric aggregation strategies (Sum, Max, First, Constant, Custom)
Handles section filtering for efficient response generation
Provides consolidated cluster metrics
Single-Shard Handler ([ShardInfoRequest]
Routes INFO command to a specific shard by index
Validates shard_id (numeric, within range)
Transforms [INFO.SHARD [section]] → [INFO [section]] sent to target shard
Command Registration
Added info.shard to supported commands list
Registered INFO as cluster-scope command for aggregation
Updated command splitter routing logic
Files Modified
command_splitter_impl.cc/h: Added ShardInfoRequest handler and INFO aggregation
cluster_response_handler.cc/h: Implemented InfoCmdAggregateResponseHandler with metric aggregation
[supported_commands.cc/h]: Registered new commands
[command_splitter_impl_test.cc]: Added comprehensive test suites
Impact
Reduced network bandwidth for health checks (from N-shard concatenated response to single aggregated response)
Improved client performance (Spring Data Redis and similar frameworks)
Better scalability (overhead doesn't grow linearly with cluster size)
Enhanced debugging capability (INFO.SHARD for targeted diagnostics)
Backward compatible (existing INFO behavior replaced with smarter aggregation)
Risk Level: LOW
Testing:
Test Coverage
InfoShardHandlerTest: 7 comprehensive test cases covering validation, routing, error handling
ClusterScopeInfoTest: 8 test cases covering aggregation types, section filtering, error scenarios
All tests passing
Docs Changes:
redis.rst
current.yaml
Release Notes:
NA