3 ms·
Every time I've seen a cache in web applications it's because the underlying system is poorly designed. We have frameworks that can handle 1000s of requests pe
by nrjdhsbsid 10y ago
Every time I've seen a cache in web applications it's because the underlying system is poorly designed.
We have frameworks that can handle 1000s of requests per second on regular hardware, that enough for a single machine to run 99.9% of the sites in the internet.
Take WordPress for example. It's so dog slow that caching is basically required, since even powerful servers can only manage 10-20 pages per second.
If WordPress was running Java or Go instead of PHP caching would be totally unnecessary
- al2o3cr 10y agoWe have frameworks that can handle 1000s of requests per second on regular hardware Well, that's the server farm for helloworld.com sorted then.
- dismantlethesun 10y agoWordpress typically requires caching not simply because the PHP response time is so, but because it puts out so many SQL queries that it'll overburden the database. If instead of caching, you go to horizontal scaling on wordpress, you'll quickly find that the database becomes the bottleneck.
- nrjdhsbsid 10y agoWordpress is its own beast with horizontal scaling too. It's quite difficult to run a load balanced ep instance simply because it was never designed for that. We used to runs ton of wp sites at my last place, and if the cache wasn't enough the usual course of action was to throw it on a server/database combo that was practically a supercomputer. PHP takes up way too much RAM per thread and it's just slow and terrible to work with on popular sites :(
- dismantlethesun 10y agoWas using PHP7 helpful? It has reportedly lower memory consumption.