All settings are environment variables, read once at startup. Set them the same on every node, then restart to apply. The full settings reference lists every option and its validation rules.
Workers and queues
Match these to your CPUs and memory. Bigger queues hold more waiting work; they don't add CPU. When a queue is full, requests get a 503.
| Setting | Default | What it does |
|---|---|---|
FLOWER_QUERY_WORKERS | CPU count | Slots for cache lookups and authorization callbacks. |
FLOWER_PREPARATION_WORKERS | FLOWER_QUERY_WORKERS | Shared slots per node for queries, writes, authorization and watch updates. |
FLOWER_WRITER_PREPARATION_WORKERS | FLOWER_PREPARATION_WORKERS | How many writes can be prepared in parallel before being committed in order. Set 1 for workloads where most writes conflict. |
FLOWER_PREPARATION_MEMORY_BYTES | workers × (guest + Rust memory) | Total memory reserved for running evaluations. |
FLOWER_QUEUED_INPUT_BYTES | 64 MiB | Memory for waiting requests, cached responses in flight and connected watches' current values. Slow clients hold on to this memory. |
FLOWER_READ_QUEUE_CAPACITY | 64 × CPUs | Fresh reads waiting for a quorum check. |
FLOWER_READ_TIMEOUT_MS | 10,000 ms | Deadline for a fresh read, including queueing. |
FLOWER_WRITER_QUEUE_CAPACITY | 128 × CPUs; 2 × batch size if set; 128 in fixed mode | Mutations waiting to be written. |
FLOWER_WRITER_BATCH_MODE | adaptive | Adaptive sizes write batches from measured cost. Set fixed for count-based batches. |
FLOWER_WRITER_BATCH_SIZE | unset (64 in fixed mode) | Optional cap on mutations per batch. |
FLOWER_HTTP2_MAX_STREAMS | unset (no limit) | Concurrent HTTP/2 streams per connection. |
Watches have no fixed count limit. Connections, memory and CPU set the real limit, so measure with your own queries and update rate.
Per-request limits
These cap each evaluation and request. Raising one costs memory or waiting time; it never weakens isolation, quorum or durability.
| Setting | Default | What it does |
|---|---|---|
FLOWER_EVALUATION_TIMEOUT_MS | 10,000 ms | Deadline for one evaluation, including nested callbacks. |
FLOWER_BUNDLE_MAX_BYTES | 2 MiB | Size of deployed application code. |
FLOWER_RESULT_MAX_BYTES | 16 MiB | Size of a value returned by an evaluation. |
FLOWER_GUEST_MEMORY_BYTES | 128 MiB | JavaScript memory for one evaluation. |
FLOWER_RUST_MEMORY_BYTES | 128 MiB | Host memory for one evaluation's pending changes. |
FLOWER_INDEX_MEMORY_BYTES | 16 MiB | Cache for lookups on undeclared indexes. Declared indexes are stored and don't use it. |
FLOWER_WASM_POOL_SLOTS | 256 | Sandbox instances per process. Nested callbacks each need one. |
FLOWER_WASM_RECYCLE_BYTES | 96 MiB | Memory kept for reusing idle sandboxes. 0 keeps none. |
FLOWER_HTTP_MAX_BODY_BYTES | 8 MiB | Incoming HTTP request body. |
FLOWER_TRANSACTION_MAX_BYTES | 32 MiB | One replicated command. |
FLOWER_RPC_MAX_BYTES | 64 MiB | One node-to-node message. |
To accept bigger payloads, raise the HTTP body, result, transaction, RPC and client limits together. HTTP headers have their own limits: FLOWER_HTTP1_MAX_HEADERS (100), FLOWER_HTTP1_MAX_BUFFER_BYTES (408 KiB) and FLOWER_HTTP2_MAX_HEADER_LIST_BYTES (16 KiB).
| Setting | Default | What it does |
|---|---|---|
FLOWER_WRITER_BATCH_MS | 50 ms | Longest time spent filling a write batch. Adaptive mode often uses less. |
FLOWER_WRITER_WINDOW_MS | 250 ms | How often writes pause so deployments and maintenance can run. |
FLOWER_DEPLOYMENT_PAGE_MS | 200 ms | Target time per page of a staged rebuild. Lower means shorter write stalls; higher means faster rebuilds. |
FLOWER_MAINTENANCE_INTERVAL_MS | 250 ms | How often timers and other maintenance are checked. |
FLOWER_MAINTENANCE_BURST_MS | 50 ms | Time allowed per maintenance catch-up round. |
FLOWER_WATCH_REFRESH_MS | 250 ms | How often idle watches are re-evaluated and fresh watches rechecked. |
FLOWER_WATCH_KEEPALIVE_MS | 15,000 ms | Interval between watch-stream keepalives. |
FLOWER_WATCH_SEND_TIMEOUT_MS | 5,000 ms | How long a slow watch client can fall behind before it is disconnected. |
Memory use and sandbox reuse
These limits are not a cap on process memory. Stored data, compiled code, caches and thread stacks cost extra. On 64-bit hosts each sandbox reserves 4 GiB of virtual address space; that isn't physical RAM.
Sandboxes are reset and reused between calls to save setup time. Every call still starts from clean state. FLOWER_WASM_RECYCLE=0 turns reuse off; FLOWER_WASM_DIRTY_PAGES=0 copies all memory on reset instead of only changed pages. See the limits reference for platform details.