| Mode | Use |
|---|---|
TRACE_MODE=all |
Development and small fleets |
TRACE_MODE=api |
Stateless HTTP (ingest + UI) |
TRACE_MODE=worker |
N job consumers |
Helm deploys API and worker separately under deploy/helm/trace.
| Backend | When to use |
|---|---|
postgres |
Default durable mid-scale |
redis |
Higher claim throughput; set TRACE_QUEUE_URL |
memory / nats (sim) |
Local tests only |
Ingest and workers must share the same TRACE_QUEUE configuration. Soft backpressure rejects enqueue when ready depth exceeds the process limit (default 50 000).
- Run multiple workers against the same queue.
- Use S3-compatible object storage (not local disk) for multi-node.
- Put PgBouncer in front of Postgres for API fan-out.
- Scope tokens per project (
X-Project-IDwhen multi-project). - Tune per-project retention; GC runs in the worker process.
- Set
TRACE_TRUSTED_PROXIESbehind a real load balancer.
- Sub-second analytics on trillions of events (no external warehouse required; optional NDJSON export exists).
- Multi-region active-active without an external design.
Scrape GET /metrics with Prometheus; alert on job backlog growth.