Database / BetterDB Interview questions
How does BetterDB Monitor detect Valkey versus Redis automatically?
The backend talks to the database through a unified adapter built on the wire-compatible iovalkey client, so the same code path works against either server.
With the default DB_TYPE=auto, it inspects the response of the server's INFO command to tell Valkey and Redis apart, then checks per-version capabilities such as COMMANDLOG (Valkey 8.1+) and CLUSTER SLOT-STATS.
Rather than erroring when a feature isn't available – say, COMMANDLOG on a Redis server – the UI simply hides or disables the panels that depend on it, so the same build works cleanly across both databases and versions.
You can override the guesswork entirely by setting DB_TYPE explicitly to valkey or redis, which is occasionally useful against a proxy or a managed service whose INFO output doesn't cleanly match either signature.
More Related questions...