#web-server #testing #latency #benchmark #curl #request #sozu

app lagging_server

a simple web server with latency, for testing purposes

1 unstable release

0.1.3 Aug 1, 2024

#230 in HTTP server

Download history 105/week @ 2024-08-01

105 downloads per month

Custom license

18KB
65 lines

lagging_server

A simple web server use to benchmark sozu. Originally written by @Keksoj

Build

cargo install --path .

Run

lagging_server --port 1054

You can run several ones, in several terminals, for instance:

lagging_server --port 1052

Et cætera

Request it with curl

curl command outcome
curl http://0.0.0.0:1054/api replies "Hey there!"
curl http://0.0.0.0:1054/latency replies after a latency period, tells about it
curl http://0.0.0.0:1054 should hang for 10 seconds
curl -X POST -d "Do you here me?" http://0.0.0.0:1054/echo echoes back to you

Try it!

Dependencies

~16–27MB
~477K SLoC