Skip to content

Commit cd3b9af

Browse files
committed
chore: add client pause docs
Signed-off-by: kostas <[email protected]>
1 parent a80fd58 commit cd3b9af

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
description: Learn how to use Redis CLIENT pause command to manage clients connected to the Redis server.
3+
---
4+
5+
import PageTitle from '@site/src/components/PageTitle';
6+
7+
# CLIENT PAUSE
8+
9+
<PageTitle title="Redis CLIENT PAUSE (Documentation) | Dragonfly" />
10+
11+
## Syntax
12+
13+
CLIENT PAUSE timeout [WRITE | ALL]
14+
15+
**Time complexity:** O(1)
16+
**ACL categories:** @admin, @slow, @dangerous, @connection
17+
18+
CLIENT PAUSE is a connections control command able to suspend all the Dragonfly clients for the specified amount of time (in milliseconds).
19+
20+
The command performs the following actions:
21+
22+
It stops processing all the pending commands from normal and pub/sub clients for the given mode. However interactions with replicas will continue normally. Note that clients are formally paused when they try to execute a command, so no work is taken on the server side for inactive clients.
23+
However it returns `OK` to the caller as soon as possible, so the `CLIENT PAUSE` command execution is not paused by itself.
24+
When the specified amount of time has elapsed, all the clients are unblocked: this will trigger the processing of all the commands accumulated in the query buffer of every client during the pause.
25+
Client pause currently supports two modes:
26+
27+
* ALL: This is the default mode. All client commands are blocked.
28+
* WRITE: Clients are only blocked if they attempt to execute a write command.
29+
30+
## Return
31+
Simple string reply: OK or an error if the timeout is invalid.

0 commit comments

Comments
 (0)