Skip to content

Commit eecc591

Browse files
authored
Document WebSocket config for standalone (#353)
1 parent 4c470f0 commit eecc591

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

docs/docs/cli-reference/standalone-config.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,41 @@ Can be one of `"error"`, `"warn"`, `"info"`, `"debug"`, `"trace"`, or `"off"`, c
4242
#### `logs.directives`
4343

4444
A list of filtering directives controlling what messages get logged, which overwrite the global [`logs.level`](#logslevel). See [`tracing documentation`](https://docs.rs/tracing-subscriber/0.3/tracing_subscriber/filter/struct.EnvFilter.html#directives) for syntax. Note that this is primarily intended as a debugging tool, and log message fields and targets are not considered stable.
45+
46+
### `websocket`
47+
48+
```toml
49+
[websocket]
50+
ping-interval = "15s"
51+
idle-timeout = "30s"
52+
close-handshake-timeout = "250ms"
53+
incoming-queue-length = 2048
54+
```
55+
56+
#### `websocket.ping-interval`
57+
58+
Interval at which the server will send `Ping` frames to keep the connection alive.
59+
Should be smaller than `websocket.idle-timeout` to be effective.
60+
61+
Values are strings of any format the [`humantime`] crate can parse.
62+
63+
#### `websocket.idle-timeout`
64+
65+
If the server hasn't received any data from the client (including `Pong` responses to previous `Ping`s it sent), it will consider the client unresponsive and close the connection.
66+
Should be greater than `websocket.ping-interval` to be effective.
67+
68+
Values are strings of any format the [`humantime`] crate can parse.
69+
70+
#### `websocket.close-handshake-timeout`
71+
72+
Time the server waits for the client to respond to a graceful connection close. If the client doesn't respond within this timeout, the connection is dropped.
73+
74+
Values are strings of any format the [`humantime`] crate can parse.
75+
76+
#### `websocket.incoming-queue-length`
77+
78+
Maximum number of client messages the server will queue up in case it is not able to process them quickly enough. When the queue length exceeds this value, the server will start disconnecting clients.
79+
Note that the limit is per client, not across all clients of a particular database.
80+
81+
82+
[`humantime`]: https://crates.io/crates/humantime

0 commit comments

Comments
 (0)