3 ms·
Those must be cached pages from dozens of servers on the backend. There is no way in heck it's realtime queries. I can tell when authors are in the WP backend
by ck2 14y ago
Those must be cached pages from dozens of servers on the backend.
There is no way in heck it's realtime queries.
I can tell when authors are in the WP backend on the server just by looking at the server load because it's crippling.
The wordpress bottleneck is not nginx vs apache vs whatever, it's the problem of loading hundreds of files for any kind of page render (even to just authenticate for ajax, etc.) and over a hundred db queries in many cases.
A cache-miss in WP is a terrible, terrible thing.
- piers 14y agoDon't forget the version of Wordpress that you download is very different from the version that's on Wordpress.com
- ck2 14y agoI know they replace the database class on wp.com to support replication (I think they even released the code once) but I don't think they do extensive changes otherwise unless you've actually read otherwise.
- robmil 14y agoIt's called HyperDB, and they did indeed release it: http://codex.wordpress.org/HyperDB http://codex.wordpress.org/HyperDB
- diego 14y agoIt's actually not that different, and of course they make as much use of caching as possible. So does my self-hosted wp blog, for that matter. If you are using WP Super Cache correctly, you can deal with significant amounts of traffic. I've seen peaks of hundreds of simultaneous users on my blog, with a server load < 1. The server is a modest aws small instance.
- ck2 14y agoSingle author mini-blogs without logged in users are super easy to cache. But multi-author blogs with thousands of logged in users is a nightmare with wp. I suspect 90%+ of wp blogs are in the mini-blog category though.
- TillE 14y agoWhy would multiple authors make a difference?
- ck2 14y agoEvery time an article is created, saved or published, wp uses hundreds of non-cachable queries. Every time an article is published, it causes the cache to be deleted for not only that article but related pages, which means all those pages have to be rendered again. For one author, that can be managed. Many authors, the cache is constantly being defeated.
- diego 14y agoWhat matters is the ratio of reads per write. Blogs with multiple authors have a higher ratio than blogs with single authors.
- batista 14y ago>For one author, that can be managed. Many authors, the cache is constantly being defeated. That's irrelevant. It's the pages view count that counts, not how many authors are in the same cms.
- Negitivefrags 14y agoCached or uncached is not relevant to the article. They are talking about using nginx as a load balancer. It just proxies all requests off to the application servers that actually prepare the results. This article is really just about the fact that nginx can efficiently service a very impressive number of connections at once. Those backend servers will be using caches of course though.
- nisa 14y agoWordpress is only reasonable fast if you use APC, memcached and the MySQL query cache. I never liked the caching plugins. If you use nginx just use the fastcgi_cache module and make cookies part of the cache key or omit the caching of pages where the login cookie is set.
- ck2 14y agoAPC+mysql cache (not just query but keycache too) is a must, but memcached is pointless unless you have a multi-server website (on a single server APC shared memory is way faster than memcached). All logged out users should be served a completely cached static page that bypasses PHP entirely, it's way faster than even an opcode cache and way less load. WP-Super-Cache can serve static pages to logged out users and makes this rather easy to setup. It's practically a must for wordpress.
- bad_user 14y agoI don't know how the caching plugin in WP works, however the most difficult part of caching is always cache invalidation, which is the reason why Memcache is better than an in-memory cache, even for a single server, because then you have the flexibility of invalidating cache entries from a background process that does not run on that server. It's also great to have the flexibility of adding more servers in case of a huge spike, even if you are running on only one server. Like on Heroku, where you can just increase the number of dynos in realtime. Doing that without a central cache that every server can access can break your MySQL because each new server will have a cold cache.
- hpatoio 14y agoIf you want a smart cache invalidation system for NGINX please have a look at this plugin http://bit.ly/nginxmanager http://bit.ly/nginxmanager Pages are cached on NGINX for not logged in user, and when a new content is published all and only the pages that contains that content are deleted from the cached and regenerated at the next request.
- nisa 14y ago
- barsxl 14y agoMany more dynamic pages than you would expect. We do hundreds of thousands of database queries/sec. We do some caching with Batcache - http://wordpress.org/extend/plugins/batcache/ http://wordpress.org/extend/plugins/batcache/ but it's more to handle large spikes in traffic for single pages/blogs. CNN during the US elections, for example.