0

When you use Django with mod_wsgi, what exactly happens when a user makes a request to the server from a browser? Does apache load up your Django app when it starts and have it running in a separate process? Does it create a new Python process for every HTTP request?

1 Answer 1

1

In embedded mode, the Django app is part of the httpd worker. In daemon mode, the Django app is a separate process and the httpd worker communicates with it over a socket. In either case, the WSGI interface is the same.

Sign up to request clarification or add additional context in comments.

3 Comments

Is there a performance difference between daemon mode and embedded mode?
The simple answer is "yes". The full answer depends on a number of factors, such as number of workers, size of the app, and more.
Hmmm, this doesn't actually answer the whole question, it is a bit more complicated than that. :-)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.