Administration

Configuration reference

How settings are found, merged and checked for the server, the SQL front-end and the watcher, where each setting is documented, and how to apply a change.

Three programs, three settings sets. This page explains the shared rules and points to the page that lists every key.

Where settings come from#

ProgramSources, first winsFile locationKeys documented in
raftdb-servercommand line, RAFTDB_* environment, file, profile defaults--config, RAFTDB_CONFIG, ./raftdb.conf, %ProgramData%\RaftDB\raftdb.conf or /etc/raftdb/raftdb.confraftdb-server settings
raftdb-mysqlthe file is read first, then a fixed set of command-line keys is applied over it--config FILE onlyraftdb-mysql settings
raftdb-watchthe file, then --key=value arguments--config FILE onlyMonitoring with the watcher

All three reject an unknown key, so a misspelling cannot silently switch a protection off.

Inspecting the settings in effect#

raftdb-server --print-config
raftdb-server --check-config
raftdb-watch --config watch.conf --check-config

--print-config lists each setting, where it came from and hides token, user, replica-user and replica-token. --check-config validates and writes nothing. raftdb-mysql has no equivalent: read its file and the start-up lines it prints.

Applying a change#

There is no reload command and no signal handler for settings. Restart the process. Stopping loses no acknowledged write, so a restart is safe; clients reconnect. Some changes only apply to tables made afterwards (engine), and some must match across a cluster (groups, sync-replicas/sync_replicas, shards for replicas of one primary: a replica adopts the primary's shard count).

Changes that are checked together#

RuleWhere
The single profile refuses a non-loopback addr.server
The replica profile needs replica-of.server
control cannot be combined with replica-of.server
groups above 1 needs control; the value is 1 to 64.server
lsm-l0-trigger <= lsm-l0-slowdown <= lsm-l0-stop.server
At least one user and a raftdb_user are required.raftdb-mysql
spin_us is 0 to 1000; raftdb_connections is 0 to 64.raftdb-mysql, server

Secrets#

  • Prefer files to the command line: passwords on the command line show in the process list.
  • raftdb-server writes admin.password and replicator.password itself, readable by their owner only (mode 600 on Unix; on Windows icacls removes inherited access, best effort, bounded to five seconds).
  • raftdb-mysql: raftdb_password_file, raftdb_password; user lines carry passwords in clear in the file. Protect the file. A # ends the value.
  • raftdb-watch: password_file, control_password_file; cluster_secret is in the file.
  • --print-config hides secrets; raftdb-watch --check-config prints the settings it understood, including passwords it loaded. Do not paste its output into a bug report.

The standard places#

ItemLinuxWindows
Settings file/etc/raftdb/raftdb.conf%ProgramData%\RaftDB\raftdb.conf
Data directory/var/lib/raftdb%ProgramData%\RaftDB
Fallback data directory./raftdb-data.\raftdb-data

The server uses the standard data directory only if it exists. install-service creates it.

See also#