Rationale
Hypercorn is the web-server used by Fluid Attacks' Platform.
The main reasons why we chose it over other alternatives are:
- It is Open source.
- It has full asynchronous programming support, which is critical for performance.
- It supports both HTTP/2 and HTTP/3, this is critical for both security and performance.
- It has full parallelism support, allowing us to have several workers within a single machine, which is critical for performance.
- It supports hot reloading, critical for development experience.
- It seamlessly integrates with Starlette.
Alternatives
The following alternatives were considered but not chosen for the following reasons:
Granian
- Granian only supports HTTP/2, which reduces security and performance.
- It is still a highly experimental project that could become relevant in the future.
Socketify.py
- Socketify only supports HTTP/2, which reduces security and performance.
- It only performs considerably faster when implemented as a framework, which would forces us to also replace Starlette with it, increasing complexity.
- Its fastest variants require us to use PyPy, increasing complexity.
- It does not support hot reloading, decreasing development experience.
Uvicorn
- Uvicorn only supports HTTP/1.1, which reduces security and performance.
- It does not support parallelism, negatively impacting performance.
Gunicorn
- Gunicorn requires implementing Uvicorn for ASGI support, thus inheriting most of the disadvantages mentioned before.
- We detected a high rate of 5XX HTTP errors when using it.
Usage
We use Hypercorn as the web-server for Fluid Attacks' Platform.