Skip to main content
Definition Website Computer and Technology

Key-Value Store

Subject: Computer and Technology noun /ˈkiːˌvæl.juː ˌstɔːr/ 1 definition

  1. Definition (noun)

    Entry #236 · Updated

    A Key-Value Store (often abbreviated KV store) is a non-relational database or storage engine that organizes data as an associative collection, pairing each unique key with an arbitrary value such as a string, binary blob, or serialized object. Rather than enforcing a fixed tabular schema or indexing fields inside the payload, it exposes simple operations (GET, PUT, DELETE) centered on direct key lookups. Because the storage layer generally treats values as opaque data, it trades rich querying capabilities—such as joins or ad-hoc secondary filtering—for predictable low-latency access, operational simplicity, and straightforward horizontal scaling.

    Common Types

    • In-Memory Caches and Stores: Keep datasets primarily in RAM, optionally backed by periodic snapshots or append-only logs, to deliver sub-millisecond latency for session state, rate limiting, and caching (e.g., Memcached, Redis).

    • Embedded Storage Engines: Run as in-process libraries that persist data to local disk using B-trees or log-structured merge-trees, eliminating network overhead for host applications and databases (e.g., RocksDB, LMDB).

    • Consensus-Backed Coordination Stores: Replicate critical metadata across cluster nodes via Raft or Paxos to provide linearizable consistency, change watches, and distributed locks for orchestration (e.g., etcd, Consul).

    • Horizontally Partitioned Distributed Stores: Shard massive keyspaces across commodity servers using consistent hashing and replication quorums to maximize availability and throughput at scale (e.g., Amazon DynamoDB, Riak).

    Example

    An e-commerce API stores active shopping carts in a Redis key-value store using keys formatted as cart:user:84921 mapped to JSON-serialized item lists with a 24-hour expiration (TTL). When a customer refreshes the checkout page, the service performs a single GET cart:user:84921 lookup in under a millisecond instead of executing multi-table SQL joins against the primary relational database.