nats.conf 1.4 KB

1234567891011121314151617181920212223242526272829303132333435
  1. # nats.conf — NATS server config for the broad-announce dev/playground
  2. # environment. Mirrors what was previously set via CLI flags, plus
  3. # the JetStream limits that 2.10 does not expose as CLI flags.
  4. #
  5. # Mounted at /etc/nats/nats.conf by docker-compose. Loaded via -c flag.
  6. #
  7. # See M11_NATS_INVESTIGATION.md for why max_store is 10G and why
  8. # we have stream-level MaxBytes/MaxAge in broker.go (not here).
  9. # Client port (apps connect to nats:4222)
  10. port: 4222
  11. # HTTP monitoring port (Prometheus + ops access)
  12. monitor_port: 8222
  13. # Disable per-message tracing in dev (we use structured logging elsewhere)
  14. # trace: true
  15. # JetStream configuration.
  16. # max_store: hard cap on disk-backed storage. With 11 GiB free on
  17. # parres (post-prune 2026-06-16), 10 GiB gives a safety
  18. # margin while still being well above the actual stream
  19. # usage (~1.1 GiB after the broker.go fix).
  20. # max_mem: hard cap on memory-backed storage. Set to 1 GiB
  21. # (parres has 16 GiB total RAM; ollama + prometheus +
  22. # clickhouse + grafana use the rest). Streams we declare
  23. # are file-backed, so this only matters for any future
  24. # memory-backed streams.
  25. # store_dir: where JetStream writes its files. Mounted from the
  26. # natsdata docker volume.
  27. jetstream {
  28. store_dir: /data/jetstream
  29. max_store: 10737418240 # 10 GiB
  30. max_mem: 1073741824 # 1 GiB
  31. }