Varnish vs memcache/d for Apache Varnish vs memcache/d for Apache apache apache

Varnish vs memcache/d for Apache


Comparing Varnish and Memcached is like comparing apples and oranges. Varnish is a caching reverse HTTP proxy, and it sits in front of your Apache web server. Memcached on the other hand is a distributed object caching system. It can be used, for instance, to cache content retrieved from the MySQL server.

Not knowing anything about the specifics of your website, I would say Varnish is the simplest way to go. You could, in theory, just throw it in front of your Apache and have your pages fly. Of course this is not the case in real life. You need to tune Varnish to your specific needs to handle cookies, cache banning etc. efficiently.

Memcached requires changes to your code. You need to go through your code, investigate where you could gain leverage from caching and implement changes as required.

Neither Varnish nor Memcached provides a plug-in solution to speed up your site, but both are excellent tools to help you reach that goal.