eka wrote:
> Hi,
> 
> I'm new to django, and reading around, found out that it's better to
> have 2 different web servers for django and static content. How is so?

It's scalability issue.  Each process of a server setup to serve dynamic 
content (using mod_python for instance) typically uses much more memory 
than a server tuned to serving just static content.  So, for example 
(made up numbers) with X memory you can run Y simultaneous dynamic 
servers or 10*Y static ones.  That means you can handle 10 times the 
(static)traffic.

And when you're a huge successful site you might only need 1-2 machines 
to serve static content were as you'll have many, many serving dynamic 
content.

Another reason would be to split static content from your regular 
hosting provider to something like a CDN or Amazon S3.  Which might be 
cheaper / faster than your regular hosting provider.


> And in deployment, how should this be? I mean, should I have 2 apache
> instances? or use another web server for static content or...?

If I was bothering with serving static and dynamic content separately I 
wouldn't use apache to serve the static content.  Use something 
lightweight and fast like nginx or lighttpd.  And depending on your 
situation you can get rid of apache all together and have the 
nginx/lighttpd proxy to something like wsgi or fastcgi django.

On the other hand if I didn't expect a moderate amount of traffic I 
might skip the whole splitting dynamic/static content issue until and if 
I run into scalability issues.

-- 
Norman J. Harman Jr.
Senior Web Specialist, Austin American-Statesman
___________________________________________________________________________
You've got fun!  Check out Austin360.com for all the entertainment
info you need to live it up in the big city!

--~--~---------~--~----~------------~-------~--~----~
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