Select Page

What is Key-Value Store?

A key-value store is a simple database pattern that uses an associative array (like a map or dictionary) as the base data model where each key is associated with one and only one value in a collection. This relation between the two values is called a key-value pair.

A more accurate name for a key-value store would be a key-value database because that is what it is — a database. It uses simple relations between two values to organize data efficiently and quickly. In each key-value pair of this database model, an arbitrary string (such as a hash or filename) represents each key. These values can be any data, and they are stored as a BLOB. A BLOB (Binary Large Object) is a collection of binary data — typically images, audio, or other multimedia objects — stored as a single entity in a database management system. Storing the data as a BLOB removes the need for an index and improves performance.

Key-value stores provide a way to store, retrieve, and update data using simple commands such as get, put, and delete. They bypass the need to consider indexes and make requests directly to the object in memory or on disk. The simplicity of this database model makes key-value stores fast, easy to use, flexible, portable, and scalable.

Why is Key-Value Store Important?

As the need for more efficient data storage and retrieval techniques increases, so does the value of key-value stores. Data is increasing steadily in quantity, and key-value stores provide the speed needed to manipulate this data at high proficiency. The major advantages of key-value stores are scalability, speed, and flexibility.

Scalability

Key-value stores handle size well and are good at processing a constant stream of read/write operations. This property makes it highly scalable.

Key-value stores scale-out by implementing partitions, replication, and auto-recovery. They can scale up by maintaining the database in RAM. By avoiding locks, latches, and low-overhead server calls, key-value stores can minimize the effects of ACID guarantees, which guarantee that transactions persist somewhere once they are committed.

Speed

As stated above, key-value stores use simple operational commands such as get, put, and delete, which makes them highly proficient at processing constant streams of read/write operations. The path requests they use are shorter and more direct in length, meaning that more operations can be performed in a given amount of time compared to other database models.

Flexibility

Both the scalability and speed of key-value stores make them highly flexible. The combination of these two properties makes them great for the following:

  • Analyzing customer shopping habits or providing coupons and ads in real-time
  • Storing user preferences and profiles
  • Working as a cache for heavily accessed but rarely updated data
  • Product recommendations
  • Managing sessions at large scales

A key-value store is used commonly for storing data for customer personalization.

If the term “key-value store” sounds familiar, it should, as it is how LinkedIn, Google, MongoDB, AWS, and others scaled over the last decade. These industry giants built infrastructures on key-value stores instead of 4Kb fixed blocks, and they used the high efficiency of key-value stores to rise to the top.

Recent Standards

The governing body SNIA, Storage Networking Industry Association, has embraced the key-value store standard. Samsung, as well, has developed an open standard prototype key-value SSD and is working to help productize it. A key-value SSD implements an object-like storage scheme on the drive instead of reading and writing data blocks as requested by a host server or storage array controller. In effect, the drive has an Object Translation Layer, which converts between object key-value pairs and the native blocks of the SSD.

What does a key-value store mean for capacity, flash technology and performance

Key-value stores offer a great approach for collecting and storing unstructured data, which can cause system performance to stall when combined with an SSD. Key-value databases easily can scale up and move to bigger storage volumes or scale out by adding more storage servers. When these two approaches work together, it creates a new approach, referred to as scale-through. With more modern scale-through technologies, the systems can separate capacity and performance, making it ideal for storing and accessing large amounts of unstructured data.