Django + uvicorn poor performance

134 views
Skip to first unread message

Marcin Szpulak

unread,
Aug 3, 2022, 9:26:37 AM8/3/22
to Django users

I'm testing Django asgi performance using two very simple views. I'm running gunicorn and uvicorn in such a manner:

 1.  gunicorn core.wsgi --workers=1 --threads=1 --access-logfile=- core.wsgi:application uvicorn --workers 1 core.asgi:application
2. uvicorn --workers 1 core.asgi:application

View is really simple :
def simple_sync_view(request): 
      usernames = "Hello World" 
      return JsonResponse({'message': usernames})

Project has no middlewares enabled. When testing using : wrk -t10 -c100 -d10s http://127.0.0.1:8000/test/sync/ synchronous server is always several times faster.

So I wonder, is the Django in asgi mode so slow or what ?

Reply all
Reply to author
Forward
0 new messages