On Apr 26, 8:10 am, "Jeremy Dunck" <[EMAIL PROTECTED]> wrote:
> On 4/25/07, Jin Lee <[EMAIL PROTECTED]> wrote:
> > 5) Using apache, can you run a pool of django processes so that if one user
> > is doing something particularly heavy, it doesnt slow down the entire site?
> > (Basically what you do with Apache balancer and mongrels in ruby)
>
> The typical deployment uses Apache prefork, which are indeed separate
> processes.  Some people also use worker, which is threaded.  Python

If you are running Apache on Windows which some of the questions
suggest may being used, Apache only creates a single process in which
all requests are handled. That single process can use multiple threads
to handle concurrent requests however.

Note though that no matter whether you use Windows or UNIX (Linux)
systems, when you run multiple Django instances all are still resident
within one process. Thus, even though prefork and worker on UNIX use
multiple processes, each process still has all Django instances in it.
The requests are just shared across the processes as well as threads
within a process when supported.

In other words, when using mod_python at least, there is no ability to
say that one users Django instances runs in a process of its with
others users also in their own process. Thus, one Django instance
running badly or using up lots of memory can affect the performance of
other users Django instances.

Also, because all Django instances are resident in the same process,
they all run as the same user which is normally a special Apache user.

If you require that different users Django instances be run in
separate processes you can't use mod_python in a single Apache server
instance. What you would have to do in that case is using proxying to
redirect to different backend servers for each user, use fastcgi, or
when the feature for distinct daemon processes per user is made
available, use mod_wsgi.

Graham


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to