MuduDB Server Configuration Contract v1#
Scope#
This document specifies the mudud.cfg server configuration file format. The file controls server listen ports, execution mode, runtime paths, and io_uring behavior.
Version history#
Version |
Date |
Summary |
|---|---|---|
1 |
2026-6-25 |
Initial TOML configuration. No explicit |
File location#
The server loads the configuration from the first file that exists, in this order:
The path provided by
--cfg /path/to/mudud.cfg(or-c /path/to/mudud.cfg), if given../mudud.cfgin the current working directory.~/.mududb/mudud.cfgin the user’s home directory.
If none of these files exist, the server returns a NotFound error. Use mudud init-cfg to create a default ./mudud.cfg before starting the server.
Configuration fields#
Field |
Type |
Default |
Description |
|---|---|---|---|
|
string |
|
Path to the application package directory. |
|
string |
|
Path to the database directory. |
|
string |
|
IP address to listen on. |
|
u16 |
|
HTTP management API port. |
|
usize |
|
HTTP worker thread count. |
|
u16 |
|
PostgreSQL wire protocol port. |
|
string |
|
Wasm component ABI target. Allowed: |
|
boolean |
|
Enable the WASI component runtime. |
|
string |
|
|
|
u16 |
|
TCP framed protocol port. |
|
boolean |
|
One TCP listener per worker. |
|
usize |
|
Worker thread count. |
|
u32 |
|
io_uring completion queue depth. |
|
boolean |
|
Enable io_uring accept multishot. |
|
boolean |
|
Enable io_uring recv multishot. |
|
boolean |
|
Enable io_uring fixed buffers. |
|
boolean |
|
Enable io_uring fixed files. |
|
string |
|
|
|
u64 |
|
io_uring log chunk size in bytes. |
|
usize |
|
Database page size in bytes. This is a persistent setting; changing it for an existing database requires migration or re-initialization. |
Compatibility notes#
There is currently no explicit
versionfield in the file. The format version is implicit and derived from the set of fields recognized by the parser.serde(default)ensures that missing fields use the default values, allowing older config files to load on newer binaries as long as they use the current field names.
Upgrade and rollback rules#
Upgrade: When a v2 config format is introduced, an explicit
version = 2field will be required. New optional fields may be added to v1 without bumping the version if they useserde(default).Rollback: A newer binary can read older config files because of defaults, provided they use the current field names. A v1-only binary encountering a v2 config will fail to parse unknown fields and return a decode error; it will not modify the file.
Migration: No migration tool is required for additive changes. For breaking changes, an offline config migration tool must be provided.
Deprecation policy#
A new explicit
versionfield will be added when a breaking change is introduced.
References#
Parser:
mudu_runtime/src/backend/mudud_cfg.rsExample config:
doc/cfg/mudud.cfg