READWRITE(3valkey)

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

πŸ’– READWRITE πŸ’–

okay bestie, welcome to the Valkey Command Manual ✨ β€” this one's short, sweet, and honestly a little iconic. it's giving "one line of syntax, whole lot of feelings" πŸŽ€


✨ NAME ✨

readwrite β€” enables read-write queries for a connection to a Valkey replica node. yes ma'am, that's the whole job 🫢


🌸 SYNOPSIS 🌸

READWRITE

that's it. no args, no flags, no drama. she's minimal πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the tea β˜• β€” READWRITE disables read queries for a connection to a Valkey replica node.

read queries against a Valkey Cluster replica node are disabled by default. that's just how she is.

for standalone replica nodes, since Valkey 8.0, read queries are also disabled for clients that have executed the valkey-client-capa(7) CLIENT CAPA redirect command. so like, if you ran that, no sneaky reads for you πŸ™ˆ

but β€” and this is the good part β€” you can use the valkey-readonly(7) READONLY command to change this behavior on a per-connection basis πŸ”₯ and READWRITE is the uno-reverse card: it resets the readonly mode flag of a connection back to readwrite. slay.


πŸ’Œ REPLY πŸ’Œ

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

just a lil OK, like a text back that says "k" but affectionate πŸ’–


⚑ COMPLEXITY ⚑

O(1) β€” constant time, no cap, instant, main character speed πŸ‘‘


πŸ” ACL CATEGORIES πŸ”

  • @connection
  • @fast

πŸ“œ HISTORY πŸ“œ

  • Available since: 3.0.0

she's been here since day one-ish and she's still thriving 🌈


πŸ‘€ SEE ALSO πŸ‘€

that's the whole friend group, go say hi 🧚


⚠️ heads up bestie: READWRITE turns reads off, READONLY turns them on. do not mix them up or you will be in the group chat asking why your reads are failing 😭

k bye, ily, this page is from 9.0.0, dated 2025-10-21 πŸ’œ go read your replicas responsibly πŸ“πŸ’…

πŸ“¦ where this page comes from