What have we done ?

What we have done is like a Virtuous Circle of performance :
For one request :
- Apache generates a static file after code execution
- This static file will then be served blazing-fast by nginx for subsequent request
- Thanks to Browser-cache plugin, Varnish will also be tell to keep this content RAM-Cached
The synergy of these elements is the key of the performance we get, and is why you should now get 6000+ requests/sec performance on your blog, just as I am (and with a page load time of 0.892sec for the whole index page approximately including images, 0.00163sec for the index page generation itself)
Have fun tuning your new system, and please contribute and give feedback within comments !
=== Update ===
Thanks a lot for all your mail feedbacks and private messages.
What could be done to go further ?
This article was written for a low-end VPS case, although these advices will fit your needs even for High-end dedicated server.
However, here are a few things that could be done on a dedicated environment to scale up the solution (horizontally) :
- Varnish fine-tuning : thread_pool/-s malloc storage
- Dedicated Varnish server
- Web servers Load balancing(Varnish, HAProxy)
- Memcached backend
- Dedicated MySQL server
- Hyperdb MySQL Sharding
- And more…
In an upcoming article, I’ll talk about the fine tuning of Varnish, to better fit your needs on High-end dedicated servers or Large Instance VPS.
Another article is coming which will define a High Availability/Scalability architecture for Million-Views/Day WordPress.
Prepare yourself to more Nginx, HA Proxy, Varnish, Keepalived, HyperDB, MySQL Sharding, Memcached, Repcached, SSD-Swap-Dedicateds disks…
And last but not least, the very same series of article will come about Magento :
- Magento Performance Guide : From 0.68rq/s to 7100rq/s on a 1Vcpu/2GB Ram VPS
- Magento High Availability/Scalability architecture for Million-Products/Thousands Checkouts a day
I’m using Varnish too now, and I like the 1000-2000 hits/s that it can easily provide on my low-end VPS. I do find you need quite a lot of RAM for it to work well, though!
Pingback: WordPress Optimization Tips - Gabfire Premium WordPress Themes
Hi, nice work! Thanx.
But are you shure to set “proxy_set_header X-Forwarded-For $remote_addr;” in nginx config? What’s the value of $remote_addr?
Isn’t it the adress of the varnish-cache in front?
I have the problem that my piwik-service isn’t tracking the user-ip with the setup you described.