Load test gRPC services
gRPC keeps the wire compact and the conversation binary. Stresix drives unary and streaming calls from a real shooter on the private network and reports the latency percentiles that matter.
Unary and streaming
Start with unary calls to find the service ceiling, then add streaming calls to test long-lived connections and flow control. Both run from the same k6 runner.
How Stresix runs it
The shooter runs the script in Docker and reaches the target over a private network. Live samples stream to the workspace as the load ramps.
What the recommendation captures
gRPC services are CPU-bound at high call rates. The run recommends the setup that fits your call volume and latency budget.
import grpc from 'k6/net/grpc';
import { check } from 'k6';
const client = new grpc.Client();
client.load(['definitions'], 'helloworld.proto');
export const options = { vus: 300, duration: '5m' };
export default function () {
client.connect('your-app.example:50051', { plaintext: true });
const response = client.invoke('helloworld.Greeter/SayHello', {
name: 'stresix',
});
check(response, { 'status OK': (r) => r && r.status === grpc.StatusOK });
client.close();
}Frequently asked questions
Does Stresix compile .proto files for me?
The k6 script is yours, and the standard k6 grpc client loads .proto definitions from the script filesystem.
Can I test plaintext gRPC backends?
Yes. The script controls the connection options, including plaintext for internal services.
Which gRPC metrics should I watch?
Per-method p95 and p99 latency, error rate, and active stream count. Those expose most gRPC failure modes.
Related guides
stop guessing your specs. start knowing them.
point stresix at a target and get the number you can deploy on, in one run.
Start a load test