Load test a Knative HTTP service¶
Load test a Knative HTTP Service and validate SLOs
Before you begin
- Install Iter8.
- Install Knative and deploy your first Knative Service. As noted at the end of the Knative tutorial, when you curl the Knative service, you should see the expected output as follows.
- Complete the Iter8 quick start tutorial.
1. Download experiment chart¶
iter8 hub -e load-test cd load-test
2. Run experiment¶
iter8 run command combines an experiment chart with the supplied values to generate the
experiment.yaml file, runs the experiment, and writes results into the
iter8 run --set url=http://hello.default.127.0.0.1.sslip.io \ --set SLOs.error-rate=0 \ --set SLOs.mean-latency=50 \ --set SLOs.p90=100 \ --set SLOs.p'97\.5'=200
3. Assert outcomes¶
Assert that the experiment completed without any failures and SLOs are satisfied.
iter8 assert -c completed -c nofailure -c slos
4. View report¶
View a report of the experiment in HTML or text formats as follows.
iter8 report -o html > report.html # open report.html with a browser. In MacOS, you can use the command: # open report.html
iter8 report -o text
Congratulations! You completed your Iter8-Knative experiment.
Useful variations of this experiment
Control the request generation process by setting the number of queries/duration of the load test, the number of queries sent per second during the test, and the number of parallel connections used to send requests.
HTTP services with POST endpoints may accept payloads. Send various types of content as payload during the load test.
values.yamlfile in the experiment chart folder documents all the values that can be supplied during the experiment.