This is design document for minigun
application. Main goal is to create load testing tool for HTTP servers.
Typical user should be able to:
- Perform
n
HTTP requests withm
concurrent connections against ip address with any HTTP method(GET,POST...) - Perform as much as possible requests against ip address in
k
seconds - CLI should return Report with average request times and other relevant statistics
Main inspiration is bombardier program.
Implementation should be carried out with Rust language.
Use Ockham's Coding Standard
Every back-end developer from time to time hits a performance problem with his service. To test such service there should be a tool which is very performant and produce informative reports. Solution designed here should consist of:
- Technical Design Document
- Examples
- CLI which handles communication with server over HTTP/HTTPS
Rust Community will assess this project.
To test a web server, user has to provide properties like:
- IP address
- Port
- Headers(Optionally)
- Body(Optionally)
- Test Parameters
- Output format(stdout or file?)
Extra features:
- progress bar
- latency distribution
- fine-grained statistics
Beside server address, rest of properties should have a defaults.
Authentication should be provided by a user via Headers
option.
Test Parameters should allow for such scenarios:
- Request count - how many requests should be performed
- Concurrency - how many concurrent connections should be utilised
- Timeout - how many seconds should
minigun
shoot at
- Test
n
times withm
threads
$ minigun -a 127.0.0.1 -p 8080 -n 1000 -m 100
Report:
Performed 1000 requests with 100 connections
Avg. time 20.3 ms
Responses:
5xx 0
4xx 0
3xx 0
2XX 1000
1xx 0
- Test for a
k
seconds with everything you got
$ minigun -a 127.0.0.1 -p 8080 -t 100
Report:
Performed 1932 requests with 100 connections for 100 s
Avg. time 20.3 ms
Responses:
5xx 0
4xx 0
3xx 0
2XX 1932
1xx 0
Whole test should be wrapped with async
runtime.
There should be a such components:
job dispatcher
- which dispatch and receives updates from job workers and subsequently produce final report. Also keeps the application state.job worker
- which performs requests and push messages tojob dispatcher
Communication between those should be handled by channels.
Provide also graceful shutdown operation in case of SIGINT.