A single server can't hold all data. You need partitioning:
Hash partitioning: Hash the key, mod by partition count. Simple but rebalancing is painful.
Consistent hashing: Keys and servers map to a ring. Adding a server only moves nearby keys. Better for scaling.
Range partitioning: Keys A-M on server , N-Z on server . Good for range queries but can create hotspots.
Most key-value stores use consistent hashing with virtual nodes. Each physical server owns multiple points on the ring, improving balance.