Skip to content

Load-Test Tool: Architecture ​

Updated: 11/10/26, 10:51:10 AM

This page explains where load comes from, which components it lands on, where data comes from, and how metrics are collected. It does not cover code structure.

Component Boundaries ​

RoleResponsibilityBoundary
Load generator hostGenerates requests, computes metrics, generates data, produces reportsOutbound only; installs no agent inside the application under test
Main appTarget under load; carries order placement, refund, and callbacksThe tool never changes its configuration or data; read-only sampling
Channel sub-app + Mock ChannelAbsorb payment results so the chain is completeMock side: automatic callbacks off, capacity raised
Dedicated load-test databaseLanding point for data generation and consistency checksSeparate database; the tool never switches databases

Data Plane vs Control Plane ​

PlanePathWhy not share one path
Load-generation planeHTTP open API (after signing)Only the real business entry measures the real signing, signature verification, and persistence overhead
Data planeDirect PostgreSQL connection, batch COPY writesGenerating millions of orders through the API is impractical and should not count toward throughput
Sampling planeactuator, pg_stat, Redis INFO, local hostRead-only observation, outside the business chain

Metric Pipeline ​

Three definitions must not be mixed up:

  • Stable ceiling: the highest TPS that continuously meets the SLA (P99, error rate, backpressure);
  • Breaking point: the first tier that fails;
  • Recommended capacity: stable ceiling × 0.7.

Samples taken during a run are persisted per step (steps.jsonl); the step summary and slowest-step curve in the report are generated from it and can be re-checked afterwards.

Design Constraints ​

ConstraintReason
Single binary with embedded consoleNo Node and no build chain on the load generator host; copy one exe and run
Intranet targets enforced, database names containing prod rejectedLoad testing writes data; pointing at production would pollute real data
No database switching, no configuration changesSwitching databases requires restarting the main app, which the operator must do explicitly and confirm
Manual triggering, no scheduled jobsResource usage and data writes during a run cannot be scheduled automatically
End-to-end key maskingReports go to the accepting party and must not carry any key material