Skip to content

Configuration ​

How operators write and validate broker configuration — every key of the allowlisted set.

Source of truth: the 19-key allowlist is frozen design, not implementation status — a key appears here because a reason for it was written down first ("no rationale, no key"), not because a broker already reads it.

Frozen Decisions ​

  • Format: JSON (straight to moonbitlang/core json); a _comment key array at the top of the file carries human notes.
  • Parsing is fail-fast: unknown keys are rejected (any key outside the allowlist fails CI); no hot reload (v0 boundary).
  • All 19 keys are update_mode = read-only — a placeholder for a three-tier update taxonomy (read-only / hot-reload / dynamic); no key can change without a restart in v0.

The Allowlist (19 keys) ​

#KeyTypeDefaultWhy it must existupdate_mode
1node_idu16statically assignedCluster identity and the primary key of the static membership table — replication and leader election cannot address a node without itread-only
2peers[node_id; addr]3-entry static tablev0 is a static 3-node cluster; membership changes belong to v2 (Redpanda's members management has already shown how complex that gets)read-only
3leader_priorityu16[]in peers orderStatic preferred-leader choice; the deterministic source for lease-timeout demotionread-only
4listen_clientaddr0.0.0.0:7188Entry point for the client wire protocolread-only
5listen_peeraddr0.0.0.0:7189Entry point for replication + heartbeat; kept separate from client trafficread-only
6data_dirpath./dataRoot of every segment / metadata / snapshot; the only persisted locationread-only
7segment_max_bytesu6467108864 (64 MiB)Segment rotation boundary; without it segments grow without boundread-only
8partition_default_countu164Default when DECLARE does not specify one; ignored when a count is given explicitlyread-only
9delivery_max_attemptsu325Retry ceiling — the last chance before the DLQread-only
10delivery_lease_msu3230000Message lease; timeout redelivery is the liveness source of at-least-onceread-only
11poll_max_wait_msu325000Long-poll upper bound; stops connections hanging idleread-only
12credit_initial_countu32256Initial credit window (count); credit_bytes = 2 MiB is derived from the same ratio. Post-freeze revision: the earlier 64 and its old name are voidread-only
13metadata_snapshot_recordsu328192Snapshot threshold; without it the metadata log replays without boundread-only
14metrics_enabledbooltrueThe /metrics switch; turning it off saves sampling overheadread-only
15log_levelenum: debug|info|warn|errorinfoThe minimum needed for troubleshooting — everything beyond that belongs in /metricsread-only
16listen_wsaddrdisabled (optional)The browser demo needs a WebSocket listener; off by default, and wss is a reserved slotread-only
17listen_adminaddr127.0.0.1:7190Admin HTTP entry (/metrics /healthz /stats + CLI read paths), bound to localhost by defaultread-only
18ws_origins[str]localhost / 127.0.0.1 allowlistWebSocket Origin allowlist (an empty list rejects everything); blocks cross-site WebSocket hijackingread-only
19peer_secretsecretempty — the peer handshake refuses to open a link (the T041 behavior)Carries the node-to-node shared secret (REQ-SEC-003); pairs with key 2 peers, the address table it authenticatesread-only

Naming note ​

listen_client is the key's name, not listen_tcp. Both authoritative sources — this allowlist and the WebSocket minimal spec ("same process, different port") — use listen_client; the distinction matters because the same process also exposes listen_peer and listen_admin.

Entry Template (every key carries all fields) ​

FieldTypeDefaultRationaleupdate_mode
…read-only

Rejection Example ​

json
{ "listen_https": "…" }

→ startup rejected: unknown key: listen_https (outside the allowlist).

Without code yet

No broker reads this file today. Every default above is a frozen design value; when the config parser lands, these 19 keys are the acceptance bar — a key outside this table must fail startup, and a key in this table that the parser does not know is a defect in the parser.