Skip to content

Load test multiple gRPC endpoints

Load Test gRPC describes how to load test a single method from a gRPC service inside Kubernetes. This tutorial expands on the previous tutorial and describes how to load test multiple endpoints from an HTTP service.


Before you begin
  1. Try Your first performance test. Understand the main concepts behind Iter8.
  2. Deploy the sample gRPC service in the Kubernetes cluster.
    kubectl create deployment routeguide --image=golang --port=50051 \
    -- bash -c "git clone -b v1.52.0 --depth 1; cd grpc-go/examples/route_guide; sed -i "''" "'"s/localhost//"'" server/server.go; go run server/server.go"
    kubectl expose deployment routeguide --port=50051
  3. Have Grafana available. For example, Grafana can be installed on your cluster as follows:
    kubectl create deploy grafana --image=grafana/grafana
    kubectl expose deploy grafana --port=3000

Install the Iter8 controller

helm install --repo --version 0.1.12 iter8 controller
helm install --repo --version 0.1.12 iter8 controller \
--set clusterScoped=true
kubectl apply -k ''
kubectl apply -k ''

Launch performance test

helm upgrade --install \
--repo --version 0.17 routeguide-test iter8 \
--set "tasks={ready,grpc}" \
--set ready.deploy=routeguide \
--set ready.service=routeguide \
--set ready.timeout=60s \
--set \
--set grpc.protoURL= \
--set \
--set grpc.endpoints.getFeature.dataURL= \
--set \
--set grpc.endpoints.listFeatures.dataURL=
About this performance test

This performance test consists of two tasks, namely, ready, and grpc.

The ready task checks if the routeguide deployment exists and is available, and the routeguide service exists.

The grpc task sends call requests to two methods of the cluster-local gRPC service, and collects Iter8's built-in gRPC load test metrics. The two methods are routeguide.RouteGuide.GetFeature and routeguide.RouteGuide.ListFeatures. Note that each method also has its own dataURL for the request payload.

View results using Grafana

Inspect the metrics using Grafana. If Grafana is deployed to your cluster, port-forward requests as follows:

kubectl port-forward service/grafana 3000:3000

Open Grafana by going to http://localhost:3000.

Add a JSON API data source routeguide-test with the following parameters:

  • URL: http://iter8.default:8080/grpcDashboard
  • Query string: namespace=default&test=routeguide-test

Create a new dashboard by import. Paste the contents of the grpc Grafana dashboard into the text box and load it. Associate it with the JSON API data source defined above.

The Iter8 dashboard will look like the following:

grpc Iter8 dashboard with multiple endpoints

View logs

Logs are useful for debugging.

kubectl logs -l


Remove the performance test and the sample app from the Kubernetes cluster.

helm delete routeguide-test
kubectl delete svc/routeguide
kubectl delete deploy/routeguide

Uninstall the Iter8 controller

helm delete iter8
kubectl delete -k ''
kubectl delete -k ''
Some variations and extensions of this performance test
  1. The grpc task can be configured with load related parameters such as the total number of requests, requests per second, or number of concurrent connections.