Memcached vs Varnish

Get Advice Icon

Need advice about which tool to choose?Ask the StackShare community!

Memcached
Memcached

2.6K
1.6K
+ 1
451
Varnish
Varnish

10K
772
+ 1
354
Add tool

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.

What is Memcached?

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?

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.
Get Advice Icon

Need advice about which tool to choose?Ask the StackShare community!

Why do developers choose Memcached?
Why do developers choose Varnish?

Sign up to add, upvote and see more prosMake informed product decisions

What are the cons of using Memcached?
What are the cons of using Varnish?
    Be the first to leave a con
      Be the first to leave a con
      What companies use Memcached?
      What companies use Varnish?

      Sign up to get full access to all the companiesMake informed product decisions

      What tools integrate with Memcached?
      What tools integrate with Varnish?

      Sign up to get full access to all the tool integrationsMake informed product decisions

      What are some alternatives to Memcached and Varnish?
      Redis
      Redis is an open source, BSD licensed, advanced key-value store. It is often referred to as a data structure server since keys can contain strings, hashes, lists, sets and sorted sets.
      Ehcache
      Ehcache is an open source, standards-based cache for boosting performance, offloading your database, and simplifying scalability. It's the most widely-used Java-based cache because it's robust, proven, and full-featured. Ehcache scales from in-process, with one or more nodes, all the way to mixed in-process/out-of-process configurations with terabyte-sized caches.
      Hazelcast
      With its various distributed data structures, distributed caching capabilities, elastic nature, memcache support, integration with Spring and Hibernate and more importantly with so many happy users, Hazelcast is feature-rich, enterprise-ready and developer-friendly in-memory data grid solution.
      MongoDB
      MongoDB stores data in JSON-like documents that can vary in structure, offering a dynamic, flexible schema. MongoDB was also designed for high availability and scalability, with built-in replication and auto-sharding.
      Couchbase
      Developed as an alternative to traditionally inflexible SQL databases, the Couchbase NoSQL database is built on an open source foundation and architected to help developers solve real-world problems and meet high scalability demands.
      See all alternatives
      Decisions about Memcached and Varnish
      No stack decisions found
      Interest over time
      Reviews of Memcached and Varnish
      Review ofVarnishVarnish

      Thank you for posting such a great article! I found your website perfect for my needs. It contains wonderful and helpful posts. Keep up the good work!. Thank you for this wonderful Article! five nights at freddy's

      How developers use Memcached and Varnish
      Avatar of Pinterest
      Pinterest uses VarnishVarnish

      When you visit the site, you talk to a load balancer which chooses a varnish front-end which in turn talks to our web front-ends which used to run nine python processes. Each of these processes are serving the exact same version on any given web front-end.

      Avatar of The Independent
      The Independent uses VarnishVarnish

      Varnish sits as a secondary cache layer behind Akamai. Two servers operate in a Primary/Secondary configuration with failover managed by HAProxy. Requests peak at around 10k/s.

      Avatar of Reactor Digital
      Reactor Digital uses MemcachedMemcached

      As part of the cacheing system within Drupal.

      Memcached mainly took care of creating and rebuilding the REST API cache once changes had been made within Drupal.

      Avatar of Casey Smith
      Casey Smith uses MemcachedMemcached

      Distributed cache exposed through Google App Engine APIs; use to stage fresh data (incoming and recently processed) for faster access in data processing pipeline.

      Avatar of The Independent
      The Independent uses MemcachedMemcached

      Memcache caches database results and articles, reducing overall DB load and allowing seamless DB maintenance during quiet periods.

      Avatar of Hevelop
      Hevelop uses VarnishVarnish

      Varnish is the http cache proxy we use to achieve maximum performance on high traffic e-commerce.

      Avatar of eXon Technologies
      eXon Technologies uses MemcachedMemcached

      Used to cache most used files for our clients. Connected with CloudFlare Railgun Optimizer.

      Avatar of Pruvit
      Pruvit uses VarnishVarnish

      Used as part of site hosting (Firebase HTTP Hosting manages implementation)

      Avatar of ScholaNoctis
      ScholaNoctis uses MemcachedMemcached

      Memcached is used as a simple page cache across the whole application.

      Avatar of Reactor Digital
      Reactor Digital uses VarnishVarnish

      Caching static content requested by Drupal.

      How much does Memcached cost?
      How much does Varnish cost?
      Pricing unavailable
      Pricing unavailable