40 lines
1.8 KiB
TOML
40 lines
1.8 KiB
TOML
# WeaselDB Configuration File
|
|
# See config.md for complete documentation of all configuration options
|
|
|
|
[server]
|
|
# Network interfaces where WeaselDB will accept connections
|
|
# Options: TCP (address + port) or Unix domain sockets (path)
|
|
# For production, use TCP. For local testing, consider Unix sockets for better performance
|
|
interfaces = [
|
|
{ type = "tcp", address = "127.0.0.1", port = 8080 }
|
|
]
|
|
# Maximum size allowed for incoming requests (larger requests are rejected)
|
|
# Increase if you need to handle very large transaction payloads
|
|
max_request_size_bytes = 1048576 # 1MB
|
|
# Number of worker threads handling network connections
|
|
# Start with 1, increase if CPU usage is high under load
|
|
io_threads = 1
|
|
# Internal network processing batch size
|
|
# Higher values may improve throughput at cost of latency
|
|
event_batch_size = 32
|
|
|
|
[commit]
|
|
# Required minimum length for transaction request IDs
|
|
# Longer IDs reduce chance of accidental duplicates across clients
|
|
min_request_id_length = 20
|
|
# How long to keep transaction status information available (hours)
|
|
# Used by status API to look up the outcome of completed transactions
|
|
request_id_retention_hours = 24
|
|
# Alternative retention policy: keep transaction status for at least this many database versions
|
|
# Ensures status lookups work even during periods of low database activity
|
|
request_id_retention_versions = 100000000
|
|
|
|
[subscription]
|
|
# Memory limit for buffering change stream data per subscriber (bytes)
|
|
# Subscribers that fall behind will be disconnected when this limit is reached
|
|
# See api.md for details on the subscription streaming API
|
|
max_buffer_size_bytes = 10485760 # 10MB
|
|
# How often to send keep-alive messages to streaming subscribers (seconds)
|
|
# Prevents network timeouts during periods of no database activity
|
|
keepalive_interval_seconds = 30
|