3 ms·
As a "meta-answer", you might consider breaking these questions up and asking them on one of the stackexchange sites. However: 1. "What kind of load" depends
by jacques_chester 16y ago
As a "meta-answer", you might consider breaking these questions up and asking them on one of the stackexchange sites.
However:
1. "What kind of load" depends on your anticipated visits to the site. There's no substitute for real traffic, but simulation can do in a pinch. Likewise there's no substitute for simulation, but capacity planning tools can do in a pinch. Look at The Art of Capacity Planning, The Art of Application Performance Testing and Guerilla Capacity Planning.
2. There are many tools, some quite sophisticated. Look at siege, httperf and others like them. Consider also using automatic UAT tools (like Cucumber) as the basis for performance and stress tests.
3. Look into monit, zenoss or nagios. There are others.
4. Profiling, profiling, profiling. And ditch Apache, it's a memory hog. Consider lighttpd or nginx.
- edanm 16y agoThanks, I'll look into those. When you say ditch Apache, do you mean completely? I know a fairly common setup is to use nginx+Apache to serve Django (with nginx serving the static content and Apache the Django code). Should I be running everything from nginx?
- jacques_chester 16y agoPersonally I don't see the point in keeping Apache. It just adds more moving parts and more points of failure to have two HTTP daemons. I'd ditch it entirely and switch to WSGI or FastCGI.
- 2mur 16y agoYou should at least try nginx/gunicorn (http://gunicorn.org/ http://gunicorn.org/). And if your clients are constantly pinging and the data hasn't changed, make sure you are caching it in memcache (etc) to relieve the database. http://ericholscher.com/blog/2010/aug/16/lessons-learned-dash-easy-django-deployment/ http://ericholscher.com/blog/2010/aug/16/lessons-learned-das...
- edanm 16y agoHonestly, I'm a little scared of using something like gunicorn. I could be wrong, but it seems like an extremely new technology, especially when compared to Apache, which has a lot of history behind it.
- antihero 16y agoYou can have a failover, so if one breaks you can quickly boot the apache one back up.