Environment Variables

VariableDefaultDescription
CONCORDANCE_NODE_IDnode-{pid}Unique node identifier
CONCORDANCE_LISTEN127.0.0.1:4100Listen address (host:port)
CONCORDANCE_DATA_DIR./dataStorage directory for SQLite databases
CONCORDANCE_BOOTSTRAPfalseBootstrap as single-node leader
CONCORDANCE_JOINAddress of existing cluster node to join
CONCORDANCE_API_KEYdevFull-access key (used by Diminuendo)
CONCORDANCE_AGENT_API_KEYauto-generatedRead-only key (used by Podium agents)

CLI Arguments

All environment variables can be overridden via CLI:
concordance \
  --node-id=node1 \
  --listen=0.0.0.0:4100 \
  --data-dir=/var/lib/concordance \
  --bootstrap \
  --api-key=my-secret \
  --agent-key=agent-secret
To join an existing cluster:
concordance \
  --node-id=node2 \
  --listen=0.0.0.0:4100 \
  --data-dir=/var/lib/concordance \
  --join=node1:4100

Raft Tuning

These are compiled defaults in service/raft/types.ts:
ParameterValueDescription
electionTimeoutMin150msMinimum election timeout
electionTimeoutMax300msMaximum (randomized per election)
heartbeatInterval50msMust be much less than election timeout
maxAppendEntries100Max entries per AppendEntries RPC
snapshotThreshold10,000Log entries before compaction
proposalTimeout5,000msMax wait for quorum commit

Diminuendo Integration

Diminuendo’s AppConfig.ts includes:
CONCORDANCE_URL=http://127.0.0.1:4100     # Concordance cluster address
CONCORDANCE_API_KEY=dev                     # Shared with Concordance
CONCORDANCE_AGENT_API_KEY=dev-agent         # Passed to Podium agents via secrets
In dev mode, ConcordanceProcess spawns a single-node Concordance as a child process. In production, it’s a no-op — Concordance runs as a separate cluster.