Configuration Reference

August 26, 2026 ยท View on GitHub

This page collects the main configuration surfaces. Topology JSON has its own full reference in Topology Configuration.

Embedded Open

PropertyTypeDefaultMeaning
nodesinteger8Logical node count for embedded placement calculations.
dataDirstring""Empty means memory-only. Non-empty enables WAL persistence.
durabilityenumdurBuffereddurBuffered batches flushes; durStrong adds flush/fsync boundaries.
diskBackedboolfalseKeep payloads in the WAL and use ring-local segment files as the derived read layout.

Cluster Connect

PropertyTypeDefaultMeaning
peersstringrequiredComma-separated host:port list.
usernamestring""Username for password auth.
passwordstring""Password for username auth.
authTokenstring""Token-style auth convenience path.
secretKeystring""Additional secret-key gate and encrypted auth transport.
galaxystring""Expected remote galaxy name.
tlsboolfalseUse standard TLS for the TCP transport. Requires binaries built with -d:ssl.
tlsCaFilestring""CA/self-signed PEM file for server certificate verification.
tlsServerNamestring""Optional hostname override for TLS verification and SNI.
tlsInsecureSkipVerifyboolfalseSkip certificate verification for local smoke tests only.

The CLI can load these connection defaults from JSON with --config=FILE or KOUTEN_CONFIG=FILE. Command-line flags override the file.

{
  "peers": ["127.0.0.1:7301", "127.0.0.1:7302"],
  "user": "alice",
  "password": "change-me",
  "secretKey": "change-me-too",
  "galaxy": "default",
  "tls": true,
  "tlsCaFile": "/etc/koutendb/ca.crt",
  "tlsServerName": "koutendb.internal",
  "tlsInsecureSkipVerify": false
}

peers may be either a comma-separated string or an array of host:port strings. The CLI accepts the documented camelCase fields and their flag-style aliases such as secret-key, auth-token, tls-ca, and tls-server-name. Keep production config files outside the repository, lock down file permissions, and prefer external secret injection when the deployment platform provides it.

koutend rejects plaintext password authentication on non-loopback listeners unless TLS or the secret-key transport is enabled. The allowInsecureAuth / --allow-insecure-auth escape hatch is intended only for an explicitly protected development network. Ring-prefix authorization also requires authentication; a prefix list by itself is not an access-control boundary.

The current role names and replication-service boundary are listed in Roles And Service Accounts. That page also distinguishes fixed role names from deployment-defined usernames.

koutend Server Flags

koutend can load these server defaults from JSON with --config=FILE or KOUTEN_SERVER_CONFIG=FILE. Command-line flags override the file.

{
  "id": 0,
  "peers": ["127.0.0.1:7301", "127.0.0.1:7302", "127.0.0.1:7303"],
  "dataDir": "/var/lib/koutendb/node0",
  "diskBacked": true,
  "autoPack": true,
  "autoPackInterval": 300,
  "autoPackWindow": "01:00-04:00",
  "autoPackStaleRatio": 0.25,
  "autoPackMinStaleRecords": 256,
  "autoPackMaxRings": 1,
  "autoPackMaxBytes": 67108864,
  "autoPackMaxElapsedMs": 1000,
  "slowTick": 0.05,
  "placementEpoch": 1,
  "virtualArcsPerNode": 64,
  "coordinatorEpoch": 1,
  "coordinatorNode": 0,
  "coordinatorReplica": 1,
  "startDrained": false,
  "durability": "strong",
  "galaxy": "app-main",
  "secretKeyFile": "/run/secrets/koutendb-secret-key",
  "roles": [
    {
      "user": "reader",
      "passwordFile": "/run/secrets/koutendb-reader-password",
      "role": "reader",
      "prefixes": ["users"]
    },
    {
      "user": "writer",
      "passwordFile": "/run/secrets/koutendb-writer-password",
      "role": "writer",
      "prefixes": ["users", "orders"]
    },
    {
      "user": "replicator",
      "passwordFile": "/run/secrets/koutendb-replicator-password",
      "role": "replicator",
      "prefixes": ["users", "orders"]
    },
    {
      "user": "admin",
      "passwordFile": "/run/secrets/koutendb-admin-password",
      "role": "admin"
    }
  ],
  "peerAuth": {
    "user": "replicator",
    "secretKeyFile": "/run/secrets/koutendb-secret-key"
  },
  "tlsCertFile": "/etc/koutendb/server.crt",
  "tlsKeyFile": "/etc/koutendb/server.key",
  "tlsCaFile": "/etc/koutendb/ca.crt",
  "tlsServerName": "koutendb.internal"
}

The config accepts camelCase names and flag-style aliases such as placement-epoch, virtual-arcs-per-node, password-file, secret-key-file, tls-cert, and allow-ring. Changing the peer count or virtual-arc density requires increasing placementEpoch on every node. Existing data directories must be persistently drained before that change. Pending cluster transactions, warp jobs, and Universe sync events must also be resolved before startup accepts the new topology. Write-quiesced rolling scale-out migration is supported. In-place node removal fails closed; use the explicit stop-the-world workflow documented in Physical Placement and Topology Remapping. peers may be a comma-separated string or an array. allowRing / allow-ring may be a comma-separated string or an array. roles may contain either "user:password:role[:prefix1,prefix2]" strings or objects with user, password / passwordFile, role, and optional prefixes. Prefer object entries with externally mounted password files in production.

replicator and peerAuth are documented in Roles And Service Accounts. Multi-node role-based configs must select an explicit peer identity. peerAuth.user references a configured replicator or admin; its password comes from that role entry.

Validate a server config before startup:

kouten verify --server-config=/etc/koutendb/server.json
kouten doctor --server-config=/etc/koutendb/server.json --json
FlagMeaning
--config=FILELoad server defaults from JSON. KOUTEN_SERVER_CONFIG can point to the same file.
--id=NNode index in the peer list.
--peers=host:port,...Static cluster peer list.
--data=DIRPersistent data directory.
--disk-backedEnable the ring-local segment read layout. Required by automatic packing.
--slow-tick=SECONDSBackground handoff / maintenance tick interval.
--auto-packOpt in to bounded automatic ring packing. Default is off. Requires --data and --disk-backed.
--auto-pack-interval=SECONDSMinimum interval between automatic maintenance attempts. Default 300.
--auto-pack-window=HH:MM-HH:MMOptional UTC maintenance window. A range may cross midnight. Omit it for all day.
--auto-pack-stale-ratio=FPer-ring stale-ratio threshold. Default 0.25.
--auto-pack-min-stale-records=NPer-ring stale-record threshold. Default 256.
--auto-pack-max-rings=NHard ring-count limit per run. Default 1. Must be positive for automatic packing.
--auto-pack-max-bytes=NHard segment/index rewrite budget per run. Default 67108864. Must be positive for automatic packing.
--auto-pack-max-elapsed-ms=NElapsed-time budget per run. Default 1000. Must be positive for automatic packing.
--placement-epoch=NMonotonic physical placement generation. Increase it when peer count or virtual-arc settings change.
--virtual-arcs-per-node=NDeterministic virtual arcs assigned to each node. Default 64; changing it requires a placement epoch increase.
--coordinator-epoch=NMonotonic cluster transaction coordinator generation. Default 1. Increase only during explicit coordinator promotion.
--coordinator-node=NPrimary cluster transaction coordinator node index. Default 0.
--coordinator-replica=NDurable coordinator standby node index. Default -1 disables redundancy. Production coordinator redundancy requires a distinct node.
--start-drainedPersist read-only maintenance drain before serving. Use it for a newly added node during rolling topology activation.
`--durability=bufferedstrong`
--user=NAME / --password=TEXTBasic username/password gate. Prefer --password-file or KOUTEN_PASSWORD outside local smoke tests.
--password-file=FILERead the server password from a file. Trailing whitespace is stripped.
--secret-key=TEXTSecret-key gate and secure auth transport. Prefer --secret-key-file or KOUTEN_SECRET_KEY outside local smoke tests.
--secret-key-file=FILERead the secret-key gate value from a file.
--peer-user=NAMESelect the configured replicator or admin role used for outbound node connections.
--peer-secret-key=TEXTSet the outbound node secret-key. Prefer the file form.
--peer-secret-key-file=FILERead the outbound node secret-key from a file. It must match the target node's inbound secret.
--auth-token=TEXTToken-style auth convenience path. Prefer --auth-token-file or KOUTEN_AUTH_TOKEN outside local smoke tests.
--auth-token-file=FILERead token-style auth value from a file.
--tls-cert=FILE / --tls-key=FILEEnable standard TLS for the TCP listener. Requires -d:ssl.
--tls-ca=FILECA/self-signed PEM file used by the server's peer client.
--tls-server-name=NAMEOptional hostname override for peer TLS verification and SNI.
--tls-insecure-skip-verifySkip peer certificate verification for local smoke tests only.
--galaxy=NAMEGalaxy identity expected by clients.
--allow-ring=PREFIX[,PREFIX...]Ring-prefix authorization boundary.
`--role=user:password:readerwriter

Physical ownership is stable inside one placement epoch and is independent of logical ring orbit periods. The placement tuple is persisted in the WAL. Startup rejects epoch rollback, same-epoch topology changes, and undrained changes to an existing topology. Empty multi-node stores above epoch 1 start drained automatically. See Physical Placement and Topology Remapping.

Coordinator assignment is independent of placement ownership. Configure the same coordinator tuple on every node. Persistent stores reject epoch rollback and same-epoch assignment changes. See Cluster Transaction Coordinator Failover.

Automatic packing runs on the server's existing single-owner maintenance path; it never accesses the same Store concurrently from another thread. The byte and elapsed limits are enforced while writing temporary generation files. If a limit or process termination interrupts a pack, the manifest is not switched and the previous complete generation remains active. Final atomic publication and directory synchronization may finish just beyond the elapsed deadline once publication has started. The latest run is stored atomically as segment-maintenance.json in the data directory.

Retrieval Tuning

Prefer SearchProfile for application-facing settings:

PropertyValuesMeaning
amountraFew, raNormal, raMany, raAllUsefulHow many useful results to retain.
scopessTight, ssNear, ssWide, ssAllHow broadly to search related rings.
depthsdShallow, sdNormal, sdDeep, sdVeryDeepHow far to descend ring hierarchy.

Lower-level knobs are still available:

PropertyRange / DefaultMeaning
budgetdefault 8Max returned retrieval hits.
focus0..100Human-facing breadth control. It maps to effective top-ring selection.
topRingsclamped internallyDirect top-ring candidate count for advanced tuning.
branchBudget0 means defaultPer-branch hierarchy breadth.
maxDepth0 means no descentChild-ring depth.
includeChildrenfalseInclude descendant rings.

Write Acknowledgement

ValueMeaning
wamAcceptedReturn after durable landing/intake.
wamAppliedReturn after owner apply.

Use configureWriteAckMode for the default and configureRingWriteAckMode for ring-specific overrides.

Ring Apply Policy

PropertyTypeMeaning
modeenumUniverse sync apply behavior.
historyKeepintegerBounded history size for modes that keep history.
delayMsintegerDelay window before timestamp-ordered apply.

Modes:

ModeMeaning
ramLatestOnlyKeep the newest logical value.
ramAppendOnlyAppend timestamped data while deduplicating event IDs.
ramBoundedHistoryKeep bounded history for future undo/redo-style use.
ramDelayedTimestampDelay application to preserve timestamp order.

Topology JSON

Use Topology Configuration for universe / galaxy recovery layouts. The important top-level fields are:

FieldMeaning
versionSchema marker. Use 1.
requiredHealthyMinimum healthy recovery archives.
authProfilesNamed references to external secret locations.
universesParallel placements. Each universe contains the same galaxy names.

Do not store raw username, password, or secretKey values in topology JSON.