nats.conf 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839
  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_file_store: hard cap on disk-backed storage. With 11 GiB free
  17. # on parres (post-prune 2026-06-16), 10 GiB gives a
  18. # safety margin while still being well above the
  19. # actual stream usage (~1.1 GiB after the broker.go
  20. # fix in f450196).
  21. # max_mem_store: hard cap on memory-backed storage. Set to 1 GiB
  22. # (parres has 16 GiB total RAM; ollama + prometheus +
  23. # clickhouse + grafana use the rest). Streams we
  24. # declare are file-backed, so this only matters for
  25. # any future memory-backed streams.
  26. # store_dir: where JetStream writes its files. Mounted from the
  27. # natsdata docker volume.
  28. #
  29. # Field names verified against nats-server 2.10 schema (the
  30. # `max_store` / `max_mem` names from 2.11+ are not valid in 2.10).
  31. jetstream {
  32. store_dir: /data/jetstream
  33. max_file_store: 10737418240 # 10 GiB
  34. max_mem_store: 1073741824 # 1 GiB
  35. }