Skip to content

Configuration

Kifa uses a three-layer configuration system:

CLI flags > Environment variables > TOML file

A setting specified as a CLI flag overrides the same setting in an environment variable, which overrides the TOML file.

Place kifa.toml in the data directory or specify a path with -c /path/to/config.toml.

kifa.toml
[storage]
memtable_flush_threshold_mib = 4
compaction_threshold = 4
compaction_enabled = true
[wal]
flush_mode = "cautious"
segment_size_mib = 16
[ingester]
channel_capacity = 1024
[sources]
stdin = false
files = ["~/logs/transactions.log"]
tcp = ["127.0.0.1:5514"]
udp = ["0.0.0.0:5515"]

All settings can be overridden via environment variables with the KIFA_ prefix:

VariableDescriptionDefault
KIFA_DATA_DIRStorage directoryRequired
KIFA_FLUSH_MODEnormal, cautious, emergencynormal
KIFA_SEGMENT_SIZE_MIBWAL segment size16
KIFA_MEMTABLE_FLUSH_THRESHOLD_MIBMemtable flush threshold4
KIFA_COMPACTION_THRESHOLDSSTable compaction trigger4
KIFA_COMPACTION_ENABLEDEnable compactiontrue
KIFA_CHANNEL_CAPACITYIngester buffer size1024
KIFA_STDINRead from stdinfalse
KIFA_FILESComma-separated file paths
KIFA_TCPComma-separated TCP addresses
KIFA_UDPComma-separated UDP addresses
KIFA_LOGLog level filter (env_logger)
Terminal
kifa ingest --help
FlagDescription
-d, --data-dirDirectory for WAL, SSTables, and metadata
-c, --configPath to TOML configuration file
--flush-modeWAL flush mode
--segment-size-mibWAL segment size in MiB
--memtable-threshold-mibFlush memtable after this many MiB
--compaction-thresholdCompact after this many SSTables
--no-compactionDisable background compaction
--channel-capacityInternal channel buffer size