Update stale documentation
This commit is contained in:
24
config.md
24
config.md
@@ -18,9 +18,7 @@ Controls server networking, threading, and request handling behavior.
|
||||
|
||||
| Parameter | Type | Default | Description |
|
||||
|-----------|------|---------|-------------|
|
||||
| `bind_address` | string | `"127.0.0.1"` | IP address to bind the server to |
|
||||
| `port` | integer | `8080` | Port number to listen on |
|
||||
| `unix_socket_path` | string | `""` (empty) | Unix domain socket path. If specified, takes precedence over TCP |
|
||||
| `interfaces` | array of objects | TCP on 127.0.0.1:8080 | Network interfaces to listen on. Each interface can be TCP or Unix socket |
|
||||
| `max_request_size_bytes` | integer | `1048576` (1MB) | Maximum size for incoming requests. Requests exceeding this limit receive a `413 Content Too Large` response |
|
||||
| `io_threads` | integer | `1` | Number of I/O threads for handling connections and network events |
|
||||
| `epoll_instances` | integer | `io_threads` | Number of epoll instances to reduce kernel contention (max: io_threads). Lower values allow multiple threads per epoll for better load balancing, higher values reduce contention |
|
||||
@@ -47,16 +45,25 @@ Controls behavior of the `/v1/subscribe` endpoint and SSE streaming.
|
||||
| `max_buffer_size_bytes` | integer | `10485760` (10MB) | Maximum amount of unconsumed data to buffer for slow subscribers. Connections are closed if this limit is exceeded |
|
||||
| `keepalive_interval_seconds` | integer | `30` | Interval between keepalive comments in the Server-Sent Events stream to prevent idle timeouts on network proxies |
|
||||
|
||||
### Benchmark Configuration (`[benchmark]`)
|
||||
|
||||
Controls benchmarking and health check behavior.
|
||||
|
||||
| Parameter | Type | Default | Description |
|
||||
|-----------|------|---------|-------------|
|
||||
| `ok_resolve_iterations` | integer | `7000` | CPU-intensive loop iterations for `/ok` requests in resolve stage. 0 = health check only, 7000 = default benchmark load (~650ns, 1M req/s) |
|
||||
|
||||
## Example Configuration
|
||||
|
||||
```toml
|
||||
# WeaselDB Configuration File
|
||||
|
||||
[server]
|
||||
# Network configuration
|
||||
bind_address = "0.0.0.0"
|
||||
port = 8080
|
||||
# unix_socket_path = "weaseldb.sock" # Alternative to TCP
|
||||
# Network interfaces - can specify multiple TCP and/or Unix socket interfaces
|
||||
interfaces = [
|
||||
{ type = "tcp", address = "0.0.0.0", port = 8080 },
|
||||
# { type = "unix", path = "weaseldb.sock" }, # Alternative Unix socket
|
||||
]
|
||||
|
||||
# Performance tuning
|
||||
max_request_size_bytes = 2097152 # 2MB
|
||||
@@ -74,6 +81,9 @@ request_id_retention_versions = 50000
|
||||
[subscription]
|
||||
max_buffer_size_bytes = 52428800 # 50MB
|
||||
keepalive_interval_seconds = 15
|
||||
|
||||
[benchmark]
|
||||
ok_resolve_iterations = 10000 # Higher load for performance testing
|
||||
```
|
||||
|
||||
## Configuration Loading
|
||||
|
||||
Reference in New Issue
Block a user