Self-Managed NVCF HTTP Soak Test
Self-Managed NVCF HTTP Soak Test
This guide walks through running a sustained HTTP soak test against a self-managed NVCF cluster using k6. The test sends a constant arrival-rate load to one or more deployed functions and reports success rate, latency percentiles, and throughput over an extended period (default 48 hours).
Prerequisites
Self-hosted CLI
You need a working nvcf-cli configured against your self-managed cluster.
If you have not set this up yet, follow the self-hosted-cli guide to
install the binary and the cli-configuration section to point it at your
gateway.
Verify the CLI can reach the cluster before continuing:
Deploy the load test function
Use the load_tester_supreme container for soak testing. It is purpose-built for high-throughput benchmarking and includes:
- gRPC + HTTP + SSE endpoints in a single image
- Tunable
repeats,delay, andsizefields to shape request/response profiles - Built-in OpenTelemetry tracing
The source, build instructions, and registry push examples are in the nv-cloud-function-helpers repository. Build and push the image to whichever container registry your cluster has credentials for:
To check which registries your cluster recognises, run
./nvcf-cli registry list.
Then create the function and deploy it using the CLI. For HTTP soak testing you can create multiple functions to simulate broader load:
Export the key so it can be passed to k6:
Repeat the function create and function deploy create steps to create
additional functions if you want to distribute load across multiple function
endpoints.
Once deployed, note the following — you will need them for the k6 script:
- Function ID — the UUID returned by
function create - Function Version ID — the UUID of the specific deployed version
- Invocation host — the
Hostheader used for invocation routing - API key — from
./nvcf-cli api-key generate(begins withnvapi-); export it as$API_KEY
Obtain the gateway address
Your gateway address is the external address of the Envoy Gateway deployed with the control plane. To retrieve it:
On AWS EKS this is an ELB hostname (e.g.
a1b2c3d4.us-east-1.elb.amazonaws.com). For a local deployment (Kind,
k3d, Docker Desktop) it is typically localhost or 127.0.0.1.
The gateway uses Host header routing to direct traffic:
For the soak test, set:
- BASE_URL =
http://$GATEWAY_ADDR - INVOKE_HOST =
invocation.$GATEWAY_ADDR
The CLI saves the function and version IDs automatically. Run
./nvcf-cli status to view them at any time.
Install k6
Install k6 if you don’t have it:
The k6 test script
Save the following script as k6-nvcf-http-soak.js. The script uses the
constant-arrival-rate executor to guarantee an exact request rate per
second regardless of response time, which is critical for soak testing where
you want a steady, predictable load.
The latest version of this script is maintained in the nv-cloud-function-helpers repository.
Running the soak test
A typical soak test uses multiple functions at a sustained TPS for an extended period. For example, multiple functions at 125 TPS each for 48 hours:
Run the soak test inside tmux or screen so it survives SSH
disconnections:
Tune the load
TPS per function
The constant-arrival-rate executor guarantees a fixed number of requests
per second. The total TPS is TPS_PER_FUNC × number of functions.
Default control plane sizing: The default resource sizing that ships
with nvcf-base is designed to handle roughly 100 concurrent users. If you
need to test beyond that, you will need to scale the control plane components
first. Starting with 100 TPS total is a good baseline for validating a
default self-managed deployment.
VU allocation
Each VU is a virtual user that can hold one in-flight request. The executor
creates new VUs if existing ones are busy. If you see
insufficient VUs, consider increasing maxVUs warnings, increase
PRE_VUS and MAX_VUS:
A good rule of thumb: PRE_VUS ≈ TPS_PER_FUNC × avg_latency_seconds × 2.
Environment variables reference
Interpreting results
k6 prints a summary to stdout at the end of each run. Key metrics to monitor during a soak test:
To save results for offline analysis:
Verifying the endpoint manually
Before running the soak test, verify the endpoint works with curl:
You should receive a 200 OK response with the Nvcf-Status: fulfilled
header and the message repeated three times.