Configuration
Meridian is configured via a TOML file passed as the first command-line argument. The configuration defines three core concepts:
- Listeners — where Meridian accepts incoming connections
- Clusters — groups of upstream backend endpoints
- Routes — rules mapping request paths to clusters
# Optional: admin API for metrics and health
admin_address = "127.0.0.1:9901"
[[listeners]]
name = "http"
address = "0.0.0.0:8080"
filter_chain = []
[[clusters]]
name = "api-backend"
lb_policy = "round_robin"
connect_timeout_ms = 5000
endpoints = [
{ address = "10.0.1.1:8080", weight = 1 },
{ address = "10.0.1.2:8080", weight = 1 },
]
[[routes]]
prefix = "/api"
cluster = "api-backend"
timeout_ms = 15000
[[routes]]
prefix = "/"
cluster = "default-backend"
Configuration Concepts
The proxy uses immutable config snapshots — once loaded, the configuration is read-only. Updates produce a new snapshot and swap atomically via arc-swap, so worker threads never see a partially-updated config.
Hot Reload
Configuration is read at startup. Hot reload via the ConfigStore::store() API allows zero-downtime config updates (used by the xDS integration path).