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

etcd

300
411
+ 1
24
Memcached

7.6K
5.5K
+ 1
473
Add tool

Memcached vs etcd: What are the differences?

Introduction

In this article, we will discuss the key differences between Memcached and etcd. Memcached is an in-memory caching system, while etcd is a distributed key-value store. Both have their own unique features and use cases. Let's explore their differences in detail.

  1. Data Persistence: Memcached does not support data persistence, which means that if the server restarts or crashes, all the cached data will be lost. On the other hand, etcd provides built-in data persistence, ensuring that the data remains intact even after a restart or failure.

  2. Consistency and Consensus: Memcached does not provide strong consistency guarantees. It uses a simple hashing algorithm to distribute data among multiple servers, but there is no consensus mechanism. In contrast, etcd uses the Raft consensus algorithm to achieve strong consistency across the distributed key-value store.

  3. Distributed Transactions: Memcached does not support distributed transactions, making it unsuitable for scenarios that require atomicity across multiple operations. Etcd, on the other hand, provides support for distributed transactions, allowing multiple operations to be grouped together and executed atomically.

  4. Watch and Notification Mechanism: Memcached does not provide a built-in mechanism for clients to watch changes to the data. In contrast, etcd offers a watch feature that allows clients to be notified of changes to the stored data, enabling reactive programming and event-driven architectures.

  5. Advanced Querying and Indexing: Memcached is a simple key-value store and does not provide advanced querying capabilities or indexing support. Etcd, on the other hand, allows the use of range queries, prefixes, and even user-defined indexes, making it more suitable for scenarios that require complex querying operations.

  6. Configuration Management: While both Memcached and etcd can be used for configuration management, etcd provides additional features such as distributed locks and leader election, making it more suitable for managing the configuration of distributed systems.

In summary, Memcached is a lightweight and fast in-memory caching system without data persistence and advanced querying capabilities, while etcd is a distributed key-value store with data persistence, strong consistency, support for distributed transactions, advanced querying capabilities, and additional features for configuration management.

Get Advice from developers at your company using StackShare Enterprise. Sign up for StackShare Enterprise.
Learn More
Pros of etcd
Pros of Memcached
  • 11
    Service discovery
  • 6
    Fault tolerant key value store
  • 2
    Secure
  • 2
    Bundled with coreos
  • 1
    Consol integration
  • 1
    Privilege Access Management
  • 1
    Open Source
  • 139
    Fast object cache
  • 129
    High-performance
  • 91
    Stable
  • 65
    Mature
  • 33
    Distributed caching system
  • 11
    Improved response time and throughput
  • 3
    Great for caching HTML
  • 2
    Putta

Sign up to add or upvote prosMake informed product decisions

Cons of etcd
Cons of Memcached
    Be the first to leave a con
    • 2
      Only caches simple types

    Sign up to add or upvote consMake informed product decisions

    - No public GitHub repository available -

    What is etcd?

    etcd is a distributed key value store that provides a reliable way to store data across a cluster of machines. It’s open-source and available on GitHub. etcd gracefully handles master elections during network partitions and will tolerate machine failure, including the master.

    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.

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

    What companies use etcd?
    What companies use Memcached?
    See which teams inside your own company are using etcd or Memcached.
    Sign up for StackShare EnterpriseLearn More

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

    What tools integrate with etcd?
    What tools integrate with Memcached?

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

    Blog Posts

    Kubernetesetcd+2
    2
    1160
    Dec 22 2020 at 9:26PM

    Pinterest

    Amazon EC2C langMemcached+4
    10
    2627
    Jun 6 2019 at 5:11PM

    AppSignal

    RedisRubyKafka+9
    15
    1644
    GitHubDockerReact+17
    40
    36280
    GitHubPythonNode.js+47
    54
    72320
    JavaScriptGitHubGit+33
    20
    2084
    What are some alternatives to etcd and Memcached?
    Consul
    Consul is a tool for service discovery and configuration. Consul is distributed, highly available, and extremely scalable.
    Zookeeper
    A centralized service for maintaining configuration information, naming, providing distributed synchronization, and providing group services. All of these kinds of services are used in some form or another by distributed applications.
    Redis
    Redis is an open source (BSD licensed), in-memory data structure store, used as a database, cache, and message broker. Redis provides data structures such as strings, hashes, lists, sets, sorted sets with range queries, bitmaps, hyperloglogs, geospatial indexes, and streams.
    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.
    Cassandra
    Partitioning means that Cassandra can distribute your data across multiple machines in an application-transparent matter. Cassandra will automatically repartition as machines are added and removed from the cluster. Row store means that like relational databases, Cassandra organizes data by rows and columns. The Cassandra Query Language (CQL) is a close relative of SQL.
    See all alternatives