INFO is answered by a single shard, so cluster-wide sections are incomplete

Open
#6 3 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
c
Domain
backend, databases

Research direction

Start with the INFO forwarding path at src/fanout.c:3509 and compare it with the broadcast and aggregation path used by DBSIZE; check src/cmd.c and COMMANDS.md for the command's current status. Decide which INFO sections can be combined across masters and how the proxy should report its cluster mode; done means INFO presents consistent cluster-wide data and matches the proxy's standalone behavior.

Written by the indexing model from the issue text.

Description

Summary

INFO is forwarded to the first master only (src/fanout.c:3509, the single-node forward path), and that node's reply is returned as-is. Sections that describe data or load across the cluster therefore cover only one shard.

Observed behavior

Tested on a local 3-master cluster (Valkey 8.1), commit b8a9990. The same proxy, same moment:

INFO keyspace  ->  db0:keys=11,expires=0,avg_ttl=0
DBSIZE         ->  26

DBSIZE is broadcast and summed, so the two disagree.

Other sections come from that one backend node too. INFO cluster reports cluster_enabled:1 even though the proxy presents itself as a standalone server and rejects CLUSTER commands. A client or monitoring tool that checks this field will switch to cluster mode and fail.

Steps to reproduce

  1. Start the proxy against a cluster with more than one master and keys spread across slots.
  2. Through the proxy, compare INFO keyspace with DBSIZE.
  3. Through the proxy, run INFO cluster.

Expected behavior

Some options, which may overlap with the planned INFO work:

  • Aggregate the sections where a sum makes sense (keyspace, the counters in stats, commandstats) across all masters.
  • Report cluster_enabled:0, or leave the field out, since clients talk to the proxy as a standalone server.
  • A proxy-specific section (connections, pools, routing) could live alongside these. Happy to help with that part.

Minor: COMMANDS.md lists INFO as "Planned", while src/cmd.c already has it on the supported command list.

Dominant language
C
Stars
18
Forks
6
Avg merge
18h 44m
Merged PRs (30d)
27

Getting set up

  • Ships a Dockerfile or Docker Compose file
  • No pull request template
  • No 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-proxy

All issues in valkey-io/valkey-proxy

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.