ASKING(3valkey)
π 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 π₯
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:
cluster(3valkey)cluster-addslots(3valkey)cluster-addslotsrange(3valkey)cluster-bumpepoch(3valkey)cluster-cancelslotmigrations(3valkey)cluster-count-failure-reports(3valkey)cluster-countkeysinslot(3valkey)cluster-delslots(3valkey)cluster-delslotsrange(3valkey)cluster-failover(3valkey)cluster-flushslots(3valkey)cluster-forget(3valkey)cluster-getkeysinslot(3valkey)cluster-getslotmigrations(3valkey)cluster-help(3valkey)cluster-info(3valkey)cluster-keyslot(3valkey)cluster-links(3valkey)cluster-meet(3valkey)cluster-migrateslots(3valkey)cluster-myid(3valkey)cluster-myshardid(3valkey)cluster-nodes(3valkey)cluster-replicas(3valkey)cluster-replicate(3valkey)cluster-reset(3valkey)cluster-saveconfig(3valkey)cluster-set-config-epoch(3valkey)cluster-setslot(3valkey)cluster-shards(3valkey)cluster-slot-stats(3valkey)cluster-slots(3valkey)cluster-syncslots(3valkey)readonly(3valkey)readwrite(3valkey)
π 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
- fedora 44: valkey-doc 9.0.3-2.fc44 Β· CC-BY-SA-4.0
- fedora 44: valkey-doc 9.0.6-1.fc44 Β· CC-BY-SA-4.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms