Skip to content

Architecture

servtuner architectureThe browser uses the frontend, which calls the API. The API stores metadata in Postgres and launches bench through a runner. Bench sends load to the target, queries Prometheus and writes the bundle to the store, which the API reads.RESTmetadatalaunchloadscraperange queriesrun bundleread bundlesFrontendsingle-page appAPIcontrol planePostgresruns and metrics indexbenchKubernetes Jobor subprocessTargetrouter or model serverPrometheusserver-side seriesBundle storedirectory or S3
The API launches bench. Only bench talks to the target under load and to Prometheus for measurements.
Component Language Owns Runs as
bench Go (the servtuner CLI) Load, snapshots, Prometheus queries, analysis and bundles A Kubernetes Job, or a local process
API Python, FastAPI Run records, launching, status, the metrics index, managed targets A Deployment
Frontend TypeScript, React The browser interface Static files served by nginx
Schemas JSON Schema RunSpecs, bundle files and status events Source for generated Go, Python and TypeScript types
Helm chart Helm Installation, RBAC, certificates and storage Your cluster

The API and bench share a command line and files. The API runs servtuner run --spec <file> --out <location>. A Job pod and a local process run the same command. The servtuner CLI also works with no API at all.

The bundle is the source of truth. bench writes raw request records and Prometheus series before any summary. Postgres holds an index that can be rebuilt from bundles.

Analysis lives in one place. The API and the frontend display results. They never recompute them.

Secrets are named, never stored. A RunSpec references Kubernetes Secrets by name. Captured environment variables are redacted.

A runner launches bench for the API.

Runner Use it for Behavior
kubernetes Clusters (chart default) One Job per run with no retries, guaranteed QoS and anti-affinity from the workload under test
subprocess Development, one node, CI bench runs inside the API process environment
Run lifecycleA run moves from pending to launching, running and collecting, and ends succeeded, failed or cancelled. Inside bench, seven steps run in order: resolve, snapshot, load, collect, normalize, summarize and finalize.bench startsexit status decidespendinglaunchingrunningcollectingsucceededfailed · cancelledresolvespecsnapshottargetloadstagescollectPrometheusnormalizerecordssummarizeanalysisfinalizemanifest
Top: the status the API records. Bottom: the steps bench executes in one run.

A follow-up run starts in awaiting_config until you confirm that the change is applied.

bench posts progress events with a token scoped to the run. Delivery problems never fail a run. The Job or process exit status is authoritative, so a pod killed for memory still ends as failed. After an API restart, the Kubernetes runner finds its Jobs again. The subprocess runner reports its interrupted runs as failed.

Learn the core concepts, or choose a deployment.