5 ms·
Many sites, including us run django and cope with several 100's of requests per minute, without issue, I've never had django become unstable or a single gateway
by matclayton 16y ago
Many sites, including us run django and cope with several 100's of requests per minute, without issue, I've never had django become unstable or a single gateway issue. How did you try and host django?
- maxklein 16y agoIt was a pretty low end server at webfaction. The point I'm making is that it should give me the same errors at low load that it gives at high load. But with django when you change your load, the errors change.
- starkfist 16y agoMost frameworks give inconsistent errors when they tip over under high load. Almost none have been designed with truly high traffic in mind.
- rbanffy 16y agoWhen something is malfunctioning, it's not very surprising when it malfunctions evenly and error reporting gets weird. You should monitor server behaviour and throttle traffic back when it's close to its limits. I usually see things on monitored servers (check memory allocation over time - how much cache, how much process, how much kernel, iowait time, swap for sharp increases) in time to issue corrective measures. Tuning maximum processes/threads on Apache seems one simple way to prevent that. Memcache and Varnish are also your friends with that - anything that prevents the workload from reaching Apache is.
- matclayton 16y agoWe have one of those as well, they arent suitable for any site where you are expecting 100's of queries per minute (unless you dont touch the db :)) the gateway error is probably a lack of django processes being made available to serve requests. This is probably nothing to do with the framework itself and is a hosting issue, try another provider, just my 2cents..
- dedward 16y agoExactly... It's common for epople to think that the framework covers every aspect of the technical architecture of the actual website/service itself - probably a natural assumption due to how the web evolved - Apache, static files, then some light scripting, then PHP. it doesn't - it's just an underlying framework. If you're expecting web-scale traffic - you have to engineer for it from the ground up - servers, content-delivery networks, design decisions, caching strategies and technologies.... yadda yadda yadda.... no framework is a magic pill that does it all - and if it were, it would quickly be outdated and inflexible.
- kgrin 16y agoSpecifically with Webfaction, that's exactly what's going on; it has to do with the particulars of their typical Django setup on the shared hosting. (I've had the same "Bad Gateway" errors from PHP sites at Webfaction... it's very much a server setup issue, not anything to do with the code it's running.
- justinph 16y agoDjango is great, as is Webfaction, but if you're getting 100's of queries per minute, Webfaction probably isn't the host for you.