nginxapache2fastapihypercornariadne-graphql

is it neccesary to use nginx or apache for python web in production?


I am developing a graphql api using ariadne and fastapi and thinking of launching it on hypercorn server. I don't have to serve static files and images. So, In my case is it necessary to use nginx or apache2 with hypercorn while I am going in production.

Note:- There will be a heavy traffic on this server

If it is necessary to use apache2/nginx , how can I configure to use it with hypercorn ?


Solution

  • Historically apache2/nginx was recommended in front of Python servers as the Python servers could only serve a single request at a time, and apache2/nginx could buffer the requests. See for example Gunicorn's docs. This isn't the case for Hypercorn (and Gunicorn's async workers) so apache2/nginx is not required.