﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
32773	Production Configuration of Django 3.2 with gunicorn and uvicorn	allen-munsch	nobody	"Hoping for a bit of guidance here.

How can I contribute to the documentation of using django ASGI in a production environment?

Also, Any suggestions on tuning these things for relatively the same performance?

Current settings ( seems to perform at about the same )
py3.8.10
django3.2
gunicorn with 18 workers using uvicorn.UvicornWorker
10 heroku Performance L instances

Previously
py3.6.13
django2.2.5
gunicorn with 10 workers using eventlet
7 heroku Performance L instances

However, notice the two instance difference is quite a bit extra in cost.

wrote out a thing to roughly benchmark django and fastapi being part of the same ASGI app. 

https://github.com/allen-munsch/benchmark-django-fastapi/ 

Specifically trying to determine upgrading from django 2.2.5 to django 3.2 and layering in FastAPI and running it in a production environment. 

Anyone here have any advice on doing that?

https://github.com/allen-munsch/benchmark-django-fastapi/blob/main/docker/web/docker-asgi-with-static-entrypoint.sh
https://github.com/allen-munsch/benchmark-django-fastapi/blob/main/testdjango/asgi_with_static.py

I was thinking these but with gunicorn --workers 18 .... on 14 heroku Performance L instances, and scaling down to 7

https://devcenter.heroku.com/articles/dyno-types

seems like django 3.2 served with uvicorn under peak load is twice as slow in a production environment ...
pretty spiky to 4x slower in comparison to using gunicorn and eventlet
with the same number of web workers ( 7 heroku Performance L )



"	Cleanup/optimization	closed	Documentation	3.2	Normal	invalid			Unreviewed	0	0	0	0	0	0
