Live data from Hacker News

WordPress Caching with Nginx and Redis

eamann.com

11–20 of 25 posts

Re: WordPress Caching with Nginx and Redis

#11
post #10
post #8

Earlier quoted context omitted.

Yep, here, Redis is an unnecessary component, since he is caching the entire HTML page it seems, in Redis. Seems he can accomplish the same with Nginx itself (which he's already using -- though not certain of the details if u are serving PHP via nginx itself too). There is a place for a Memcached/Redis type role in generating a Wordpress page. Tools like W3 Total cache store certain small elements of the page in Meme…

And memcached is not even the best option, using apc with W3 is few times faster than using memcached.

You are talking about two different things here. Memcached is a memory store, while APC is a opcode cacher. W3 seems to be a plugin for Wordpress that serves pre-rendered pages using some mod_rewrite trickery.

Re: WordPress Caching with Nginx and Redis

#12
post #10
post #8

Earlier quoted context omitted.

Yep, here, Redis is an unnecessary component, since he is caching the entire HTML page it seems, in Redis. Seems he can accomplish the same with Nginx itself (which he's already using -- though not certain of the details if u are serving PHP via nginx itself too). There is a place for a Memcached/Redis type role in generating a Wordpress page. Tools like W3 Total cache store certain small elements of the page in Meme…

And memcached is not even the best option, using apc with W3 is few times faster than using memcached.

[deleted]

Re: WordPress Caching with Nginx and Redis

#13
post #11
post #10

Earlier quoted context omitted.

And memcached is not even the best option, using apc with W3 is few times faster than using memcached.

You are talking about two different things here. Memcached is a memory store, while APC is a opcode cacher. W3 seems to be a plugin for Wordpress that serves pre-rendered pages using some mod_rewrite trickery.

I meant under W3 there are more than one option for cache storage. http://i.imgur.com/OjbyvF2.png and APC is faster than memcached in a single server environment http://stackoverflow.com/questions/1794342/memcache-vs-apc-f.... I assume that most people using php most likely already have apc installed (or they really should).

Re: WordPress Caching with Nginx and Redis

#14
post #11
post #10

Earlier quoted context omitted.

And memcached is not even the best option, using apc with W3 is few times faster than using memcached.

You are talking about two different things here. Memcached is a memory store, while APC is a opcode cacher. W3 seems to be a plugin for Wordpress that serves pre-rendered pages using some mod_rewrite trickery.

Erm, APC can be used as a memory store, too.

http://www.mysqlperformanceblog.com/2006/09/27/apc-or-memcac...

Re: WordPress Caching with Nginx and Redis

#16
> I have been working with professionally on the web for over 7 years and have not once been able to configure Memcached properly.

What were the problems you had with Memcached? Assuming you install it from your distro's respositories, you just need to tweak a configuration file with less than 10 options, the most important option being -m. Unlike Redis, Memcached rarely adds exciting new features, so there's little incentive to compile it yourself.

Re: WordPress Caching with Nginx and Redis

#17
One thing here I found surprising is the claim that Redis is easier to install than memcached.

Ubuntu or Debian: apt-get install memcached

OS X: brew install memcached

CentOS/Fedora: yum install memcached

They're both essentially one command to install on popular platforms, and both have extremely simple conf files.

Re: WordPress Caching with Nginx and Redis

#18
I'm sorry but I cannot take this article seriously. Memcached is trivial to install and to set up on all the Linux distributions that I know of. On Ubuntu, it's actually as simple as apt-get install -y memcached. I have set up memcached servers that handle tens of thousands of queries per second and it has never been a concern.

In any event, you're much better off doing full-page caching using tools designed for this task, such as Varnish. As a bonus, you get tools such as varnishtop, varnishlog and varnishstat to monitor your cache.

Re: WordPress Caching with Nginx and Redis

#19
post #16

> I have been working with professionally on the web for over 7 years and have not once been able to configure Memcached properly. What were the problems you had with Memcached? Assuming you install it from your distro's respositories, you just need to tweak a configuration file with less than 10 options, the most important option being -m. Unlike Redis, Memcached rarely adds exciting new features, so there's little…

Apparently he hasn't been working very professionally, it's an incredibly easy service to run. I still have the same version of memcached running from 2008.

Re: WordPress Caching with Nginx and Redis

#20
The whole point of HTTP is to be architected such that intermediate proxies such as Varnish are transparent accelerators.

“I just feel it’s overused.” — e.g. You wanted to use nginx and Redis, and needed to justify away from the simple solution.

It should be a smell that instead of doing full-page caching in Varnish, you’ve instead rolled your own full-page application layer caching. Varnish handles POSTs, it handles logins (configured via VCL). This solution is a hack. I applaud your performance, but it’s rather nonsensical.

Furthermore, memcached is not difficult to run — it’s a single daemon that requires less setup than Redis! And no persistent storage.

Final note: “Redis is an open source flat file database server – meaning it’s an optimized key value store for your system.” — this is somewhat nonsense. Redis is a fast datastructure-oriented KV store that happens to be able to persist state to disk, but is by no means a ‘flat file database server’ and I’m not sure how that implies that it’s an optimized KV store.

Post reply on HN