YNX
YNX

Reputation: 625

Why do we need to deploy Django with gunicorn?

We can simply start a Django server1 with python manage.py runserver 8080, so why do we need to deploy Django server2 like gunicorn myproject.wsgi? I googled about wsgi, it says that wsgi connects between nginx and Django, but what confused me is that we can make http requests(like with postman) to server1 and everything works well. So what's the difference?

Upvotes: 3

Views: 2485

Answers (2)

dcruz1990
dcruz1990

Reputation: 1

Like the Django Docs says:

DO NOT USE THIS SERVER IN A PRODUCTION SETTING. It has not gone through security audits or performance tests. (And that’s how it’s gonna stay. We’re in the business of making Web frameworks, not Web servers, so improving this server to be able to handle a production environment is outside the scope of Django.)

So, its clear for what reason we need to use Gunicorn or other similar tools to deploy it.

Upvotes: 0

Pedram
Pedram

Reputation: 3930

From django runserver documentation:

DO NOT USE THIS SERVER IN A PRODUCTION SETTING. It has not gone through security audits or performance tests. (And that’s how it’s gonna stay. We’re in the business of making Web frameworks, not Web servers, so improving this server to be able to handle a production environment is outside the scope of Django.)

Upvotes: 8

Related Questions