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

Memcached

7.6K
5.5K
+ 1
473
RocksDB

136
291
+ 1
11
Add tool

Memcached vs RocksDB: What are the differences?

Key differences between Memcached and RocksDB

Memcached and RocksDB are both popular in-memory data storage systems used in web applications. However, they have several key differences that make them suitable for different purposes.

  1. Implementation and data storage:

    • Memcached is an in-memory key-value store that stores data in a hashtable in RAM. It is simple and lightweight, designed for fast data access and caching.
    • RocksDB, on the other hand, is a persistent embedded key-value store that stores data on disk. It is optimized for durable storage and can handle large datasets.
  2. Durability and persistence:

    • Memcached does not provide durability or persistence out of the box. If the system crashes or restarts, all the cached data is lost. It is typically used for caching transient and non-critical data.
    • RocksDB, being a disk-based storage system, provides durability and persistence. It flushes data to disk periodically and can recover data in case of system failures.
  3. Performance and scalability:

    • Memcached is known for its exceptional performance in terms of storing and retrieving data from memory quickly. It is highly scalable and can handle a large number of concurrent requests.
    • RocksDB, while not as fast as Memcached for in-memory operations, offers better performance for disk-based storage. It can handle large datasets efficiently and is designed for high read and write throughput.
  4. Data consistency and atomicity:

    • Memcached does not provide built-in support for data consistency or atomic operations. It is eventually consistent and relies on the application layer for maintaining data integrity.
    • RocksDB supports atomic and consistent operations on a single key-value pair. It ensures that read and write operations on a single key are ACID-compliant.
  5. Data size and storage capacity:

    • Memcached is limited by the amount of memory available in the system. It is not suitable for storing large datasets that exceed the available memory.
    • RocksDB can handle large datasets that can exceed the available RAM. It efficiently manages data on disk and allows applications to handle larger workloads.
  6. Usability and ease of deployment:

    • Memcached is extremely easy to deploy and configure. It has a simple and straightforward API, making it suitable for lightweight caching and session storage use cases.
    • RocksDB requires more setup and configuration as it needs to be integrated into the application. It provides a more granular level of control and flexibility for data storage and retrieval.

In summary, Memcached is a lightweight, in-memory caching system optimized for performance and scalability, while RocksDB is a durable disk-based storage system designed for managing large datasets efficiently.

Advice on Memcached and RocksDB
Needs advice
on
HBaseHBaseMilvusMilvus
and
RocksDBRocksDB

I am researching different querying solutions to handle ~1 trillion records of data (in the realm of a petabyte). The data is mostly textual. I have identified a few options: Milvus, HBase, RocksDB, and Elasticsearch. I was wondering if there is a good way to compare the performance of these options (or if anyone has already done something like this). I want to be able to compare the speed of ingesting and querying textual data from these tools. Does anyone have information on this or know where I can find some? Thanks in advance!

See more
Replies (1)
Emily Kurze
Recommends

You've probably come to a decision already but for those reading...here are some resources we put together to help people learn more about Milvus and other databases https://zilliz.com/comparison and https://github.com/zilliztech/VectorDBBench. I don't think they include RocksDB or HBase yet (you could could recommend on GitHub) but hopefully they help answer your Elastic Search questions.

See more
Get Advice from developers at your company using StackShare Enterprise. Sign up for StackShare Enterprise.
Learn More
Pros of Memcached
Pros of RocksDB
  • 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
  • 5
    Very fast
  • 3
    Made by Facebook
  • 2
    Consistent performance
  • 1
    Ability to add logic to the database layer where needed

Sign up to add or upvote prosMake informed product decisions

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

    Sign up to add or upvote consMake informed product decisions

    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 RocksDB?

    RocksDB is an embeddable persistent key-value store for fast storage. RocksDB can also be the foundation for a client-server database but our current focus is on embedded workloads. RocksDB builds on LevelDB to be scalable to run on servers with many CPU cores, to efficiently use fast storage, to support IO-bound, in-memory and write-once workloads, and to be flexible to allow for innovation.

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

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

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

    What tools integrate with Memcached?
    What tools integrate with RocksDB?

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

    Blog Posts

    Jan 26 2022 at 4:34AM

    Pinterest

    Amazon EC2RocksDBOpenTSDB+3
    3
    720
    Dec 22 2020 at 9:26PM

    Pinterest

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

    AppSignal

    RedisRubyKafka+9
    15
    1639
    GitHubDockerReact+17
    40
    36256
    What are some alternatives to Memcached and RocksDB?
    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.
    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.
    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.
    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.
    See all alternatives