During the past few weeks I’ve built a basic key-value store that persists data to disk. It works, but only as a single node, so there is a fixed limit on the amount of data it can store, and the througput it can sustain. We can make the store scale horizontally in two ways: Replication, which keeps additional copies of the data in other nodes, improving throughput. Sharding, which partitions the keys across different nodes, so that we can store more data.