Design of a Key-value Store
Learn about the functional and non-functional requirements and the API design of a key-value store.
Requirements
Let’s list the requirements of designing a key-value store to overcome the problems of traditional databases.
Functional requirements
Typically, key-value stores are expected to offer functions such as get
and put
. However, what sets this particular key-value store system apart is its distinct characteristics, explained as follows:
-
Configurable service: Some applications might have a tendency to trade strong consistency for higher availability. We need to provide a configurable service so that different applications could use a range of consistency models. We need tight control over the trade-offs between availability, consistency, cost-effectiveness, and performance.
Note: Such configurations can only be performed when instantiating a new key-value store instance and cannot be changed dynamically when the system is operational.
-
Ability to always write (when we picked “A” over “C” in the context of CAP): The applications should always have the ability to write into the key-value storage. If the user wants strong consistency, this requirement ...