nginx with Memcache Vs Varnish

Solution 1:

IMHO this is not a question of "memcache vs varnish", but "varnish with or without memcache", and I think you should by all means use memcache whenever you can. In fact, memcache/memcached cahes data and objects from a database, whilst Varnish is an HTTP accelerator for "content-heavy dynamic websites".

Both work together really well, and for example a LEMP (or LNMP) platform with PHP-FPM, Varnish and memcached to host blogs and CMS (I use that config for my WordPress sites) is absolutely fantastic. In the case of WordPress, the help of plugins like W3 Total Cache that manage Varnish and memcached for different aspects of the caching makes everything transparent, and the performance is gorgeous.

So don't worry about installing it: just do it and enjoy the benefits ;)