Skip to content

perf: NATS-level baseline throughput/latency with nats bench #75

@e7217

Description

@e7217

Context

EDG advertises "ultra-low latency" and high-performance ingestion (README), but no published baseline numbers exist for the NATS data plane. Before we can reason about regressions, capacity planning, or the impact of validation overhead in internal/core/handler.go, we need a documented, reproducible baseline at the NATS layer — independent of EDG's processing pipeline.

This issue covers the NATS-level baseline only. End-to-end load through the EDG core (handler → validation → JetStream → Telegraf) is tracked separately in the scenario-based load test issue.

Goals

  1. Reproducible script at scripts/perf/nats-bench.sh wrapping nats bench for:
    • Core NATS publish throughput (platform.data.asset subject)
    • JetStream publish throughput (PLATFORM_DATA stream, matching cmd/core/main.go config)
    • Pub/Sub round-trip latency (p50, p95, p99)
  2. Documented baseline at docs/perf/baseline-nats.md:
    • Hardware/OS context (CPU, memory, disk type, NATS version)
    • Result table for varying message sizes (e.g., 256B, 1KB, 4KB) and publisher counts (1, 8, 32)
    • Distinction between core NATS and JetStream numbers (the gap is the durability cost)
  3. README/docs link so future perf work can reference the baseline.

Out of Scope

  • EDG core handler/validation overhead (covered by scenario load test issue)
  • Long-running soak tests (>10 min)
  • Multi-node NATS clustering
  • CI integration — this is run-on-demand for now

Acceptance Criteria

  • scripts/perf/nats-bench.sh runs against a local NATS+JetStream and prints structured results
  • docs/perf/baseline-nats.md includes at least one full result matrix with environment metadata
  • Stream config used in benchmark matches cmd/core/main.go:79-95 (FileStorage, retention, replicas)
  • README points to the baseline doc from the performance/reliability section

Notes

Metadata

Metadata

Assignees

No one assigned

    Labels

    designArchitecture and design discussionsenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions