{
  "$type": "site.standard.document",
  "bskyPostRef": {
    "cid": "bafyreibvfpiqyekoxnqdqpryu4gffik4euoc67kmk2n6lrvjdgxladdd7u",
    "uri": "at://did:plc:5sgu76a53rz3n6unbykmovqy/app.bsky.feed.post/3mloha3xdvov2"
  },
  "description": "An in-memory database keeps its primary dataset in RAM rather than on disk, trading capacity and durability tradeoffs for orders-of-magnitude lower read and write latency. In-memory engines back almost every cache, session store, leaderboard, rate limiter, and many real-time analytics systems.\n\n\nCommon engines\n\n * Redis. The dominant in-memory key-value store; rich data structures, optional persistence (RDB, AOF), replication, cluster sharding.\n * Memcached. Pure cache; no persistence; multi-thr",
  "path": "/engineering-glossary/in-memory-database-ram-storage/",
  "publishedAt": "2026-05-12T18:46:43.000Z",
  "site": "https://sahilkapoor.com",
  "tags": [
    "Redis",
    "Memcached",
    "Caching",
    "Eviction Policy"
  ],
  "textContent": "**An in-memory database** keeps its primary dataset in RAM rather than on disk, trading capacity and durability tradeoffs for orders-of-magnitude lower read and write latency. In-memory engines back almost every cache, session store, leaderboard, rate limiter, and many real-time analytics systems.\n\n## Common engines\n\n  * **Redis.** The dominant in-memory key-value store; rich data structures, optional persistence (RDB, AOF), replication, cluster sharding.\n  * **Memcached.** Pure cache; no persistence; multi-threaded; very simple.\n  * **Valkey.** Open-source fork of Redis after the 2024 license change; AWS and Linux Foundation backed.\n  * **DragonflyDB.** Redis-compatible multi-threaded engine optimised for modern hardware.\n  * **KeyDB.** Redis fork with multi-threading.\n  * **SAP HANA, MemSQL/SingleStore.** In-memory relational and HTAP systems.\n  * **Hazelcast, Apache Ignite.** In-memory data grids for distributed compute.\n\n\n\n## Durability strategies\n\nMost in-memory engines support some level of disk persistence to survive restarts:\n\n  * **Snapshots.** Periodic point-in-time dumps to disk.\n  * **Append-only log.** Every write recorded sequentially; replayed on startup.\n  * **Replication.** Multiple replicas reduce the chance that all copies fail at once.\n\n\n\nšŸ”—\n\n**Related Terms**\nRedis, Memcached, Caching, Eviction Policy.",
  "title": "In-memory Database",
  "updatedAt": "2026-05-13T19:14:31.277Z"
}