What is In-Memory Database?
A data store that keeps its working set in RAM rather than on disk, delivering microsecond reads for caching and real-time workloads.
Definition
An in-memory database holds data primarily in RAM, trading durability guarantees for latency measured in microseconds instead of milliseconds. Redis is the canonical example, offering rich structures — hashes, sorted sets, streams — plus optional persistence via snapshots (RDB) or an append-only file; Memcached is a simpler pure cache, and Valkey is the open-source Redis fork. Typical roles include caching hot query results, session storage, rate-limit counters, leaderboards, and pub/sub. Because RAM is finite, eviction policies like LRU decide what to drop under memory pressure, so the source of truth usually stays in a disk-based database.

