Self-Managed NVCF HTTP Soak Test
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).
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:
Use the load_tester_supreme container for soak testing. It is purpose-built for high-throughput benchmarking and includes:
repeats, delay, and size fields to shape request/response
profilesThe 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 createinvocation. in the function invocation hostname./nvcf-cli api-key generate (begins with nvapi-); export it as $API_KEYYour 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 routes invocation traffic through function-specific hostnames:
For the soak test, set INVOKE_DOMAIN to the domain after invocation.
in the function invocation hostname. For a self-managed gateway that uses
<function-id>.invocation.$GATEWAY_ADDR, set INVOKE_DOMAIN to
$GATEWAY_ADDR.
The CLI saves the function and version IDs automatically. Run
./nvcf-cli status to view them at any time.
Install k6 if you don’t have it:
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.
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:
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 the self-managed stack 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.
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.
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:
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.