Adding a New Service

This guide explains how to add a new benchmark target to the repository (a new REST service implementation) and make it show up in the existing environment:

Important: this page documents the integration points. It intentionally does not modify compose/, services/, or utils/.

Contract (what a service must provide)

At minimum, a new service should:

  1. Expose a stable HTTP endpoint you can benchmark.
    • For comparability with existing targets, aim to implement:
      • GET /api/cache/{key}
  2. Export telemetry under the same OTel pipeline where possible:
    • metrics
    • traces
    • logs
    • (optional) profiling
  3. Be buildable and runnable via Docker.

  4. Identify itself consistently:
    • container/service name in Docker Compose
    • service.name (OpenTelemetry resource attribute)
    • Grafana labels for logs/metrics/traces

Step-by-step integration checklist

1) Add the implementation under services/

Create a new folder under services/ that includes:

Keep the endpoint and response shape consistent with other implementations so that wrk2 scripts and dashboards remain comparable.

2) Wire it into Docker Compose (compose/)

Add a new Compose service for your implementation:

Also add (or update) a matching load generator entry (usually under the RAIN_FIRE profile) that points wrk2 at your new service.

3) Make sure telemetry lands in the right places

To show up in Grafana consistently, your service should propagate:

If you’re using OpenTelemetry, confirm:

4) Update load generation (wrk2)

A good baseline is:

If you add a new service, ensure:

If you want your service to be “first-class” in Grafana:

Keep dashboard naming consistent so it’s easy to compare services.

6) Document the new service

Update documentation as follows:

7) Capture results in results/

For every published run, create a run folder under results/benchmarks/….

Include:

See: results/README.md.

Touchpoints map (where things usually need changes)

Concern Folder(s) What you update
Add a new benchmark target services/ Source + Docker build context
Start/stop the target compose/ New Compose service under SERVICES
Load generator target wiring compose/, utils/wrk2/ New wrk2 target and/or container
Control-plane integration utils/nextjs-dash/, utils/orchestrator/ UI actions and orchestration endpoints
Observability pipeline routing config/alloy/, config/grafana/ OTLP pipeline and dashboards
Published results results/ Run artifacts and summary
Public docs README.md, docs/ Narrative + instructions

Common pitfalls