Hosting many small Django websites

18 views
Skip to first unread message

Diederik van der Boor

unread,
Oct 14, 2010, 4:45:23 PM10/14/10
to Django users
Hi,

I'm curious about using Django for many small web sites. Does this
require each site to run in a separate wsgi daemon process? If so, how
is it possible to keep memory usage shared?

Thanks in advance,

Diederik

Brian Bouterse

unread,
Oct 14, 2010, 6:34:16 PM10/14/10
to django...@googlegroups.com
We host many of our django sites using a django deployer we wrote called Opus.  Opus uses a separate wsgi daemon process for each site.  Each wsgi process also runs a separate user, so linux would prevent the memory from being shared.  In our case though we want to run code from many different sources and if they all ran as the same user, then one django project could monkey patch another one which creates all kinds of interesting security issues.

Brian


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




--
Brian Bouterse
ITng Services

Venkatraman S

unread,
Oct 14, 2010, 11:09:25 PM10/14/10
to django...@googlegroups.com

On Fri, Oct 15, 2010 at 2:15 AM, Diederik van der Boor <vdb...@gmail.com> wrote:

I'm curious about using Django for many small web sites. Does this
require each site to run in a separate wsgi daemon process? If so, how
is it possible to keep memory usage shared?

Not exactly sure when you have to manage the linux box, but if you have to manage many small sites, i would recommend GAE.
Best for deploying and managing(non sysad work) them without any hassles. 

-V-
http://twitter.com/venkasub

Kenneth Gonsalves

unread,
Oct 15, 2010, 1:37:26 AM10/15/10
to django...@googlegroups.com
On Thu, 2010-10-14 at 13:45 -0700, Diederik van der Boor wrote:
> I'm curious about using Django for many small web sites. Does this
> require each site to run in a separate wsgi daemon process? If so, how
> is it possible to keep memory usage shared?

I am also interested in this - currently I have one wsgi per site.
--
regards
Kenneth Gonsalves

Brian Bouterse

unread,
Oct 15, 2010, 7:56:40 AM10/15/10
to django...@googlegroups.com
One of the challenges of going the GAE route is that you need to modify your application slightly to work with their version of models.  Also, you can't ever run this code off of GAE, so it's kind of a lock-in in that respect.  That being said it does work very well.

Brian

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

Venkatraman S

unread,
Oct 15, 2010, 8:00:52 AM10/15/10
to django...@googlegroups.com

On Fri, Oct 15, 2010 at 5:26 PM, Brian Bouterse <bmbo...@gmail.com> wrote:
One of the challenges of going the GAE route is that you need to modify your application slightly to work with their version of models.  Also, you can't ever run this code off of GAE, so it's kind of a lock-in in that respect.  That being said it does work very well.

For small websites I dont think its much of a problem. Especially, given that the admin overhead is almost null.
On the code aspect, its not much of a problem too - just the syntax changes, the semantics remain the same.

-V

Diederik van der Boor

unread,
Oct 18, 2010, 3:02:52 PM10/18/10
to django...@googlegroups.com
Thanks for your suggestion about Opus, will look into that.
The security concerns are a good argument for running separate wsgi processes
afterall.

Diederik

Op Friday 15 October 2010 00:34 schreef Brian Bouterse:


> We host many of our django sites using a django deployer we wrote called

> Opus <http://github.com/bmbouter/opus>. Opus uses a separate wsgi daemon


> process for each site. Each wsgi process also runs a separate user, so
> linux would prevent the memory from being shared. In our case though we
> want to run code from many different sources and if they all ran as the
> same user, then one django project could monkey patch another one which
> creates all kinds of interesting security issues.
>
> Brian
>
> On Thu, Oct 14, 2010 at 4:45 PM, Diederik van der Boor
<vdb...@gmail.com>wrote:
> > Hi,
> >
> > I'm curious about using Django for many small web sites. Does this
> > require each site to run in a separate wsgi daemon process? If so, how
> > is it possible to keep memory usage shared?
> >
> > Thanks in advance,
> >
> > Diederik
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Django users" group.
> > To post to this group, send email to django...@googlegroups.com.
> > To unsubscribe from this group, send email to

> > django-users...@googlegroups.com<django-users%2Bunsubscribe@goog
> > legroups.com> .

Reply all
Reply to author
Forward
0 new messages