Memcached vs Varnish: What are the differences?
What is Memcached? High-performance, distributed memory object caching system. Memcached is an in-memory key-value store for small chunks of arbitrary data (strings, objects) from results of database calls, API calls, or page rendering.
What is Varnish? High-performance HTTP accelerator. Varnish Cache is a web application accelerator also known as a caching HTTP reverse proxy. You install it in front of any server that speaks HTTP and configure it to cache the contents. Varnish Cache is really, really fast. It typically speeds up delivery with a factor of 300 - 1000x, depending on your architecture.
Memcached and Varnish are primarily classified as "Databases" and "Web Cache" tools respectively.
"Fast object cache", "High-performance" and "Stable" are the key factors why developers consider Memcached; whereas "High-performance", "Very Fast" and "Very Stable" are the primary reasons why Varnish is favored.
Memcached and Varnish are both open source tools. It seems that Memcached with 9K GitHub stars and 2.6K forks on GitHub has more adoption than Varnish with 908 GitHub stars and 216 GitHub forks.
According to the StackShare community, Varnish has a broader approval, being mentioned in 1006 company stacks & 140 developers stacks; compared to Memcached, which is listed in 756 company stacks and 268 developer stacks.