Skip to content

Ask the HotKV docs

Answers come only from these docs and can be wrong; check the linked pages before you rely on them.

FAILOVER

Last updated
FAILOVER [TO host port [FORCE]] [ABORT] [TIMEOUT milliseconds]
Group
Server
Arity
-1 (at least 1 words, counting the command name)
Flags
admin
HotKV Cloud
All plans
On-Premise
no license needed

In Redis, FAILOVER makes a primary hand its role to one of its replicas. HotKV accepts the command so that tools which send it get a clear answer, but does not perform a failover with it:

  • FAILOVER with any arguments that do not include ABORT replies with an error.
  • FAILOVER ABORT (or any arguments that include ABORT) replies OK, since there is never a FAILOVER in progress to cancel.

To fail over:

Case Reply (RESP2 and RESP3)
Arguments include ABORT Simple string OK
Anything else Error ERR FAILOVER requires a running replica; replication is not configured

The error text is the same whether or not replication is configured.

127.0.0.1:6379> FAILOVER
(error) ERR FAILOVER requires a running replica; replication is not configured
127.0.0.1:6379> FAILOVER ABORT
OK

Redis 7 and Valkey 8 implement coordinated failover with this command. HotKV does not; see the alternatives above.

REPLICATION.FAILOVER, CLUSTER FAILOVER, REPLICAOF, high availability

In a cluster: Replicas and failover