Hypercorn
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 the development experience.
- It seamlessly integrates with Starlette .
Alternatives
These 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 force 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 the 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 .
Last updated on