Tests performed using ali.
Request with 4 byte payload, and common ASGI app executing the following:
async def app(scope, receive, send):
await receive() # added: receive the full payload
await send({
'type': 'http.response.start',
'status': 200,
'headers': [
(b'content-type', b'text/plain'),
],
}) # send a start callback
await send({
'type': 'http.response.body',
'body': b'Hello, world!',
}) # send a body
modified from uvicorn docs
ali http://127.0.0.1:8000 -b body --rate=50
ali http://127.0.0.1:8000 -b body --rate=500
ali http://127.0.0.1:8000 -b body --rate=1000
ali http://127.0.0.1:8000 -b body --rate=5000
uvicorn dotest.baz:app
hypercorn dotest.baz:app
spvn serve --target dotest.baz:app
hypercorn @ 5000 reqs/s (crash / ddos thresh)
uvicorn @ 5000 reqs/s (crash / ddos thresh)
spvn @ 10000 reqs/s (dropped requests but continued service <130ms P95)
Source: https://github.com/serde-rs/json-benchmark/blob/master/data/canada.json