mirror of
https://github.com/hoytech/strfry.git
synced 2025-06-16 16:28:50 +00:00
config for compression
This commit is contained in:
2
TODO
2
TODO
@ -7,8 +7,6 @@ features
|
||||
* limit on number of concurrent sync requests
|
||||
* full-db scan limited by since/until
|
||||
* `strfry sync` command always takes at least 1 second due to batching delay. figure out better way to flush
|
||||
bool values in config
|
||||
config for compression
|
||||
less verbose default logging
|
||||
make it easier for a thread to setup a quadrable env
|
||||
|
||||
|
@ -127,6 +127,15 @@ config:
|
||||
desc: "Maximum records that can be returned per filter"
|
||||
default: 500
|
||||
|
||||
- name: relay__compression__enabled
|
||||
desc: "Use permessage-deflate compression if supported by client. Reduces bandwidth, but slight increase in CPU"
|
||||
default: true
|
||||
noReload: true
|
||||
- name: relay__compression__slidingWindow
|
||||
desc: "Maintain a sliding window buffer for each connection. Improves compression, but uses more memory"
|
||||
default: true
|
||||
noReload: true
|
||||
|
||||
- name: relay__logging__dumpInAll
|
||||
desc: "Dump all incoming messages"
|
||||
default: false
|
||||
|
@ -69,7 +69,14 @@ void RelayServer::runWebsocket(ThreadPool<MsgWebsocket>::Thread &thr) {
|
||||
|
||||
|
||||
|
||||
hubGroup = hub.createGroup<uWS::SERVER>(uWS::PERMESSAGE_DEFLATE | uWS::SLIDING_DEFLATE_WINDOW, cfg().relay__maxWebsocketPayloadSize);
|
||||
{
|
||||
int extensionOptions = 0;
|
||||
|
||||
if (cfg().relay__compression__enabled) extensionOptions |= uWS::PERMESSAGE_DEFLATE;
|
||||
if (cfg().relay__compression__slidingWindow) extensionOptions |= uWS::SLIDING_DEFLATE_WINDOW;
|
||||
|
||||
hubGroup = hub.createGroup<uWS::SERVER>(extensionOptions, cfg().relay__maxWebsocketPayloadSize);
|
||||
}
|
||||
|
||||
if (cfg().relay__autoPingSeconds) hubGroup->startAutoPing(cfg().relay__autoPingSeconds * 1'000);
|
||||
|
||||
|
@ -41,6 +41,14 @@ relay {
|
||||
# Maximum records that can be returned per filter
|
||||
maxFilterLimit = 500
|
||||
|
||||
compression {
|
||||
# Use permessage-deflate compression if supported by client. Reduces bandwidth, but slight increase in CPU
|
||||
enabled = true
|
||||
|
||||
# Maintain a sliding window buffer for each connection. Improves compression, but uses more memory
|
||||
slidingWindow = true
|
||||
}
|
||||
|
||||
logging {
|
||||
# Dump all incoming messages
|
||||
dumpInAll = false
|
||||
|
Reference in New Issue
Block a user