• I have a Nginx server in front of php5-fpm workers with W3 Total cache backed by memcache. It’s a neat setup and I am very impressed with the performance and the flexibility of the configuration. But then something struck me – Nginx bypasses the php5-fpm for static files (images, etc) then refers to my php5-fpm workers to process the page. This is where W3 Total Cache steps, retrieves the page from the cache, and returns it to the user. So why not configure Nginx to check the cache and return the results if there is a match?

    From my limited knowledge and reading in the area, it seems Nginx can calculate the md5 for a URI (or similar) and connect to memcache to check for that key. If a result is found it can return the contents.

    Preliminary benchmarks suggest this would provide dramatic increases in speed. My modest server can deliver around 250 pages a second with W3, however Nginx can deliver 2,500 static HTML pages a second – possibly more if back by memcache.

    Although, I have the feeling I have missed something here.

    http://wordpress.org/extend/plugins/w3-total-cache/

Viewing 6 replies - 1 through 6 (of 6 total)
  • You may try WP-FFPC plugin to let Nginx serve cached pages directly from memcache. Of course, it’d be great, if W3TC had this feature.

    Thread Starter askegg

    (@askegg)

    Thank you. WP-FFPC is exactly the sort of thing I am looking for.

    Thank you Pothi for answering the question, I would have never come across with it in time 🙂

    Thread Starter askegg

    (@askegg)

    Hey Peter. Is there anyway to get Nginx to read the cached page directly from memcache (or even Redis, which has automatic expiry) without launching a PHP script? I feel this would see even more speed improvements.

    @askegg: Could you give me the procedure for how you have successfully installed/activated memcached for wordpress. I hav installed memcached on my server , Its running but my w3 total wp cache is not able to support/enable database cache and object cache for memcached. I could not get a proper tutorial on net!

    thanks in advance.

    @aacharya.vaddey please create your own topic. Thank you!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Using nginx to serve directly from memcache or files’ is closed to new replies.