mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
cluster/websocket: Make websocket dispatcher queue size configurable
Limit the number WebSocket events queued from external clients to dispatcher instances to produce back pressure to the clients if Zeek's IO loop is overloaded.
This commit is contained in:
parent
6bd624d9b2
commit
011029addc
9 changed files with 45 additions and 10 deletions
|
@ -46,5 +46,12 @@ event zeek_init()
|
|||
assert Cluster::listen_websocket(ws_tls_opts_copy);
|
||||
assert ! Cluster::listen_websocket(ws_opts_wss_port);
|
||||
|
||||
# Using a different max_event_queue_size fails, but using the default should work.
|
||||
local ws_opts_qs = copy(ws_opts);
|
||||
ws_opts_qs$max_event_queue_size = 42;
|
||||
assert ! Cluster::listen_websocket(ws_opts_qs);
|
||||
ws_opts_qs$max_event_queue_size = Cluster::default_websocket_max_event_queue_size;
|
||||
assert Cluster::listen_websocket(ws_opts_qs);
|
||||
|
||||
terminate();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue