Search code examples
pythondjangodjango-rest-frameworkgunicorn

Is it OK to use Django development server for single-user applications?


I'm developing an application that controls some piece of complex hardware and exposes a front-end to the users using Django, mainly for cross-platform and remote access reasons. Currently using Django templates, but soon with a separate front-end through DRF calls. My main points of interest are:

  • user management. Admin users have more access
  • session management. Ideally, one cannot login from multiple IPs at the same time.
  • web-socket support for asynchronous notifications and real-time monitoring.
  • asynchronous background operations. e.g. with celery workers

Note that the users of these application are the hardware operators which are usually no more than 3-5 tops, and most of the times, only one of them is actively working on it so no real user concurrency, neither real need to scale.

So my question is: Is there a real reason I would want to distribute my application using a production server such as gunicorn instead of simply running manage.py runserver?


Solution

  • 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.)

    The development server is not intended for use in production. It is not designed to be particularly efficient, stable, or secure. It does not support all the possible features of an HTTP server.

    In short, python manage.py runserver may work until it breaks!!