CLIENT-CAPA(3valkey)

πŸ“¦
version 9.0.6 Β· 2 versions
, in fedora 44

πŸ’– CLIENT-CAPA β€” bestie, it's in the valkey(3valkey) manual πŸ’–

okay so real talk, this is CLIENT-CAPA, a page straight out of the Valkey Command Manual. She's giving "let the server know what you can handle" and honestly? iconic behavior. let's get into it 🫢


✨ NAME ✨

client-capa β€” a client claims its capability. yes that's the whole name and yes she ate πŸ’…


✨ SYNOPSIS ✨

CLIENT CAPA capability [capability...]

✨ DESCRIPTION ✨

so here's the vibe: clients can declare their capabilities to Valkey using the CLIENT CAPA command, and Valkey will adjust the corresponding features for the current connection based on whatever the client declared. it's literally just you telling the server "hey, I can do this" and the server going "say less" πŸ”₯

you can declare multiple capabilities in the same command, no problem. and here's the chill part β€” if any capabilities are unrecognized, Valkey will just ignore them instead of returning an error. no drama, no error message, just vibes ✨

the capabilities currently supported are:

  • redirect β€” this one means the client is capable of handling redirect messages. so when you're accessing a replica node in standalone mode and a data operation happens (read or write commands), Valkey will return -REDIRECT primary-ip:port to this connection. and bestie, listen β€” the primary-ip can be an IPv6, which itself contains colons 🫠 so to properly parse the ip and port, a client needs to locate the last colon. that's the trick, that's the whole thing. also, using the valkey-readonly(7) READONLY command can enable this connection to execute read commands on the replica node. lowkey useful, highkey important πŸ‘‘

✨ REPLY ✨

valkey-protocol(7) Simple string reply: OK.

that's it. that's the reply. OK and we move on πŸ’–


✨ COMPLEXITY ✨

O(1) β€” constant time, no notes, she's efficient πŸ’…


✨ ACL CATEGORIES ✨

@connection @slow


✨ HISTORY ✨

  • Available since: 8.0.0 ⭐

✨ SEE ALSO ✨

go read these too, bestie, they're all part of the family:


and that's the whole page, you're welcome πŸ’–βœ¨

this was Valkey 9.0.0, dated 2025-10-21 β€” go forth and declare your capabilities, bestie, the server is ready for you πŸŽ€πŸ¦‹πŸ’œ

πŸ“¦ where this page comes from