Home What is the point of using Gunicorn when hosting a Django project on Linux VM
Reply: 1

What is the point of using Gunicorn when hosting a Django project on Linux VM

Nader Besada
Nader Besada Published in 2018-01-13 00:09:08Z

I have an Linux instance running on Google Compute Engine. I installed pip and django on it and cloned a Django project that I worked on locally. Like I would on localhost I ran my app like so: python3 manage.py runserver, and my server was up and running with no problems. I read online on how WSGI servers are required for python apps to run well on servers however I don't see why I would need something like gunicorn to run my app

Blender Reply to 2018-01-13 00:17:29Z

Here's what the documentation for runserver 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.)

Django's runserver is itself a WSGI server, but it's aimed at being easy for developers to use.

Production WSGI servers like uWSGI and Gunicorn have performance and production environments in mind. They handle concurrency better, they are faster, and are built to withstand malicious users, not just developers.

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.310329 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO