This experiment generates requests for HTTP services, collects Iter8's built-in latency and error-related metrics, and validates service level objectives (SLOs).
Use-cases:
- Load test
- Benchmark
- Validate service level objectives (SLOs)
- Safe rollout
- Continuous delivery (CD)
If the HTTP service satisfies SLOs, it may be safely rolled out, for example, from a test environment to production.
Benchmark an HTTP service with a GET endpoint by specifying the url
.
iter8 launch -c load-test-http --set url=https://httpbin.org/get
The following metrics are collected by default by this experiment:
http/request-count
: total number of requests senthttp/error-count
: number of error responseshttp/error-rate
: fraction of error responseshttp/latency-mean
: mean of observed latency valueshttp/latency-stddev
: standard deviation of observed latency valueshttp/latency-min
: min of observed latency valueshttp/latency-max
: max of observed latency valueshttp/latency-pX
: X-th percentile latency, for X in[50.0, 75.0, 90.0, 95.0, 99.0, 99.9]
Latency metrics have msec
units. Any latency percentiles that are specified as part of SLOs are also collected.
--set SLOs.http/error-rate=0 \
--set SLOs.http/latency-mean=50 \
--set SLOs.http/latency-p90=100 \
--set SLOs.http/latency-p'97\.5'=200
In the above setting, the following SLOs will be validated.
- error rate is 0
- mean latency is under 50 msec
- 90th percentile latency is under 100 msec
- 97.5th percentile latency is under 200 msec
Control the characteristics of the load generated by the load-test-http
experiment by setting the number of queries (numQueries
), duration (duration
), the number of queries sent per second (qps
), and the number of parallel connections used to send queries (connections
).
--set numQueries=200 \
--set qps=10 \
--set connections=5
Refer to the values.yaml
file which documents additional parameters related to the load profile such as duration
.
Send any type of content as payload and specify the HTTP Content Type header. These options switch the HTTP method to POST.
Specify payload as a string. By default, its content type is set to application/octet-stream
.
--set payloadStr="abc123"
--set payloadStr="abc123" \
--set contentType="text/plain"
Fetch JSON content from a URL. Use this JSON as payload. Set content type to application/json
.
--set payloadURL=https://data.police.uk/api/crimes-street-dates \
--set contentType="application/json"
Fetch jpeg image from a URL. Use this image as payload. Set content type to image/jpeg
.
--set payloadURL=https://cdn.pixabay.com/photo/2021/09/08/17/58/poppy-6607526_1280.jpg \
--set contentType="image/jpeg"