Contender Server

April 15, 2026 · View on GitHub

The Contender server exposes a JSON-RPC API for managing load-testing sessions and a web UI for interactive use. It runs two listeners:

  • JSON-RPC server — accepts RPC calls and WebSocket subscriptions for session management and log streaming.
  • SSE / static server — serves the web UI, API documentation, and SSE log streams.

Quickstart

contender server

By default this starts:

ServiceDefault Address
JSON-RPC127.0.0.1:3000
Web UI / SSE127.0.0.1:3001

Once running, open localhost:3001 in a browser to access the web UI.

Environment Variables

VariableDefaultDescription
RPC_HOST127.0.0.1:3000Address and port for the JSON-RPC server.
SSE_HOST127.0.0.1:3001Address and port for the web UI / SSE server.
RUST_LOGinfoLog level filter (uses tracing_subscriber EnvFilter syntax, e.g. debug, contender=trace).

Example — bind to all interfaces on custom ports:

RPC_HOST=0.0.0.0:9000 SSE_HOST=0.0.0.0:9001 contender server

HTML Routes

The HTML/SSE server hosts the following endpoints:

RouteDescription
/ , /index.htmlWeb UI for managing sessions and viewing logs.
/docsInteractive API documentation (rendered from the OpenRPC spec).
/openrpc.jsonMachine-readable OpenRPC specification of the JSON-RPC API.
/logs/{session_id}SSE stream of logs for a given session.

RPC Methods

The JSON-RPC API exposes the following methods (see /docs for full schemas):

MethodDescription
statusGet server status.
addSessionCreate a new contender session.
getSessionGet info for a session by ID.
getAllSessionsList all sessions.
removeSessionRemove a session by ID.
spamStart a spam run for a session.
stopStop a running session.
fundAccountsFund accounts for a session.
subscribeLogsSubscribe to session logs (WebSocket).