client-pause.3valkey - Man Page

Suspends commands processing.

Synopsis

CLIENT PAUSE timeout [WRITE | ALL]

Description

CLIENT PAUSE is a connections control command able to suspend all the Valkey clients for the specified amount of time (in milliseconds).

The command performs the following actions:

Client pause currently supports two modes:

For the WRITE mode, some commands have special behavior:

This command is useful as it makes able to switch clients from a Valkey instance to another one in a controlled way. For example during an instance upgrade the system administrator could do the following:

The recommended mode for client pause is WRITE. This mode will stop all replication traffic, can be aborted with the CLIENT UNPAUSE command, and allows reconfiguring the old master without risking accepting writes after the failover. This is also the mode used during cluster failover.

This command also prevents keys to be evicted or expired during the time clients are paused. This way the dataset is guaranteed to be static not just from the point of view of clients not being able to write, but also from the point of view of internal operations.

Reply

valkey-protocol(7) Simple string reply: OK or an error if the timeout is invalid.

Complexity

O(1)

Acl Categories

@admin @connection @dangerous @slow

History

See Also

auth(3valkey), client(3valkey), client-caching(3valkey), client-capa(3valkey), client-getname(3valkey), client-getredir(3valkey), client-help(3valkey), client-id(3valkey), client-info(3valkey), client-kill(3valkey), client-list(3valkey), client-no-evict(3valkey), client-no-touch(3valkey), client-reply(3valkey), client-setinfo(3valkey), client-setname(3valkey), client-tracking(3valkey), client-trackinginfo(3valkey), client-unblock(3valkey), client-unpause(3valkey), echo(3valkey), hello(3valkey), ping(3valkey), reset(3valkey), select(3valkey)

Info

2024-09-23 8.0.0 Valkey Command Manual