Configuration
NamiDB defaults are sane for most workloads. Reach for these env vars when you’re debugging performance, memory, or correctness.
Engine
| Env var | Default | What it does |
|---|---|---|
NAMIDB_ADJACENCY | on | Process-wide CSR adjacency cache shared across snapshots (RFC-018). Set to off to disable. |
NAMIDB_NODE_CACHE | on | Cross-snapshot NodeView lookup cache (RFC-019). |
NAMIDB_SST_CACHE | on | SST body + decoded edge property streams + parsed EdgeSstReader (RFC-020). |
NAMIDB_FACTORIZE | off | Factorized intermediate representation in the executor (RFC-017). Turn on for path-heavy queries. |
NAMIDB_PROFILE_DUMP | off | Dump per-stage profile counters to stderr after each query. |
Cache budgets
| Env var | Default | Notes |
|---|---|---|
NAMIDB_ADJACENCY_BUDGET_MB | 512 | RAM ceiling for the CSR cache. |
NAMIDB_NODE_CACHE_BUDGET_MB | 512 | RAM ceiling for the NodeView cache. |
NAMIDB_SST_CACHE_BUDGET_MB | 512 | RAM ceiling for the SST cache. |
For server workloads, bump these to 2–8 GiB per cache. For embedded use inside a Lambda or a small container, halve them.
namidb-server
| Env var | Default | What it does |
|---|---|---|
NAMIDB_STORE | — (required) | Storage URI (e.g. s3://bucket?ns=prod®ion=us-east-1). |
NAMIDB_LISTEN | 0.0.0.0:8080 | TCP bind address. |
NAMIDB_AUTH_TOKEN | unset (open) | Bearer token. When unset the server warns and accepts all requests — do not expose unauthenticated to the public internet. |
NAMIDB_FLUSH_INTERVAL | 30s | Background memtable → L0 flush cadence. 0s disables the loop. |
CLI flags mirror the env vars: --store, --listen, --auth-token,
--flush-interval.
Cloud / storage credentials
NamiDB reads the standard env vars for each cloud:
| Backend | Env vars |
|---|---|
| AWS S3 | AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN, AWS_DEFAULT_REGION |
| Cloudflare R2 | Same as S3 — set R2 token as AWS_* |
| Google Cloud Storage | GOOGLE_APPLICATION_CREDENTIALS (path to JSON key) |
| Azure Blob | AZURE_STORAGE_ACCOUNT_NAME, AZURE_STORAGE_ACCESS_KEY |
| MinIO / LocalStack | Same as S3 — point at endpoint=… in the URI |
IAM roles on EC2 / EKS / Lambda / ECS work transparently — no NamiDB-specific auth to wire.
Tracing & logs
NamiDB uses tracing. Standard
env-filter applies:
export RUST_LOG=namidb=info,namidb_storage=debugJSON logs:
export NAMIDB_LOG_FORMAT=json