http-delayed-resp
is a tiny application that can be used to debug HTTP
connections in scenarios where network infrastructure might be bugging you. It
allows the client to dictate how fast the server will respond, and can therefore
simulate slow servers, long-polling systems, and other similar situations.
There are 2 ways to run http-delayed-resp
:
- Use the docker image
- Download a precompiled binary (Linux x86_64 only) and execute
./http-delayed-resp_x86_64
.
Use an environment variable called DELAYED_RESP_PORT
to specify the port. It
will bind to 0.0.0.0:<DELAYED_RESP_PORT>
. The default port is 3000.
# simple request with a 10s delay
curl http://<host>:<port>/any/path/really?delay=10000
# or for 10 concurrent requests:
ab -n 10 -c 10 http://<host>:<port>/any/path/really?delay=10000