[Answered ]-Django's built in web server: Usage and Reliability Concerns

2šŸ‘

āœ…

If youā€™re not using the development server for development of the django project, it sounds like production to me. Is deploying your application with Apache and mod WSGI worth the hassle? Thatā€™s up to you, but the advice of the Django developers is pretty unambiguous.

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

For your second question, Iā€™m not sure what you mean by ā€˜corruptedā€™. If two users are changing the same object at the same time, the second user to save can inadvertently revert the first userā€™s changes:

Consider two users editing the same Person. The first user changes the first name, then the second user changes the second name. Because the second user loaded the change page before the first user saved, the first name is changed back to Joe.

| Description   | First Name | Second Name  |
=============================================
| initial value | Joe        | Smith        |
| first user    | Joseph     | Smith        |
| second user   | Joe        | Bloggs       |
=============================================
šŸ‘¤Alasdair

0šŸ‘

Are you talking about corruption happening as a result of two separate instances of django running against the same database? If thatā€™s the case, I can definitely see a possibility of data corruption as the Djangoā€™s ORM API and Forms API arnā€™t designed to be distributed in this manner.

As far as the definition of a ā€œproductionā€ server. My understanding is that the dev server wasnā€™t designed for reliability, availability, security, or quality in general. For example, it can only serve a single request at a time. Having said that, every use case defines its own set of requirements that defines a production environment. What I consider ā€œproductionā€ for my needs, will not satisfy Amazonā€™s definition of production šŸ™‚

šŸ‘¤Dmitry B.

Leave a comment