Which cache engine to choose between redis or memcached and varnish.

twitter logo github logo ・1 min read

Hi mates, my team and i are building a web platform (Social network and Ecommerce), and we are are planning to receive a lot of traffic and i want to know which caching system will be the best between varnish, redis and memcached ? Varnish act like a load balancer (from what i read) is it a good idea to use it ?

twitter logo DISCUSS (4)
markdown guide

Redis has more features, and, IME, isn't any slower. So I'd use it instead of Memcached.

Varnish isn't comparable to the other two. Redis and Memcached are used by your application to cache chunks of data, while Varnish uses your application to generate entire web pages and caches them.


Oh this mean i can use Varnish and one of the others... like a frontend (varnish) cache and a backend cache (redis or memcached). Thank you


PS. with Varnish, make sure that your application will set correct http headers. Playing with login users, their personal data, a miss configured varnish and responding very generic in the http headers, you'll possible expose a lot of personal data between logged in users...

Classic DEV Post from May 10

Why I ignore the hype (and you should too)

It’s been 20 years since I made my first website. I've been burned by the hype ti...

ADONIS SIMO profile image
Python/Js developer.

DEV is where software developers grow up

Sign up (for free)