ASKING(3valkey)

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

πŸ’… ASKING β€” the vibe check for cluster redirects

okay so bestie, we're in the valkey manual section (that's the 3valkey part, iykyk) and today's main character is a command that literally just says "hey, I'm following that redirect, trust me". No cap.


✨ NAME ✨

asking β€” signals that a cluster client is following an -ASK redirect. That's it. That's the whole job.


🌸 SYNOPSIS 🌸

ASKING

No args. No options. Just pure unbothered energy. She's simple, she's iconic. πŸ‘‘


πŸ’– DESCRIPTION πŸ’–

So here's the tea 🍡 β€” when a cluster client gets hit with an -ASK redirect, the ASKING command gets sent to the target node, and then the redirected command follows right after it. And fr fr, this is normally all handled automatically by cluster clients, so you usually don't have to lift a finger. Let the client cook. 🧚

But wait, there's more πŸ‘€ β€” if an -ASK redirect happens during a transaction, you only need to send one ASKING command to the target node before sending the complete transaction over. Just one. Not one per command. Don't be out here spamming it. πŸ™ˆ

For the full lore, go read the ASK redirection section in valkey-cluster-spec(7) β€” that's the Valkey Cluster Specification, and yes it's required reading, sorry babe. 😭


πŸŽ€ REPLY πŸŽ€

Per valkey-protocol(7), you get a Simple string reply: OK.

Translation: she said yes. βœ…βœ¨


πŸ”₯ COMPLEXITY πŸ”₯

O(1)

Constant time, bestie. Instant. Fastest girl in the cluster. πŸ’¨


πŸ¦‹ ACL CATEGORIES πŸ¦‹

  • @connection
  • @fast

Both. She's got range. πŸ’…


⭐ HISTORY ⭐

  • πŸ“… Available since: 3.0.0

Ancient in internet years but still serving looks.


πŸ‘‘ SEE ALSO πŸ‘‘

the whole cluster friend group, plus the read-only besties:


πŸ’€ reminder bestie: ASKING is a one-shot vibe β€” it applies to the command that follows it, not forever. That's literally why cluster clients do it automatically for you. Don't go thinking it's a permanent state, because it is not.

okay that's the whole page, you're welcome 🫢 this was version 9.0.0, dated 2025-10-21, and that's on ASKING(3valkey) periodt. go slay your cluster redirects, bestie πŸŒˆπŸ“πŸ’œ

πŸ“¦ where this page comes from