GET key and SET key value.
Speaks the Redis wire protocol (RESP), so existing Redis clients and tools like redis-cli can talk to it unchanged.
Mutual exclusion lock: only one thread at a time may hold it, so only one thread at a time runs the critical section it guards.
Go’s reader/writer lock: any number of readers can hold it at once, or a single writer exclusively.
Splitting one data structure into N independent partitions (shards), each with its own lock, so operations on different shards never wait on each other.
Threads competing for the same lock. The time they spend blocked waiting for it is time not spent doing work, so throughput stops scaling with cores.
A fast, non-cryptographic hash function that mixes the input byte by byte into a 64-bit value: Fowler-Noll-Vo, 64-bit alternate variant.
Keys and nodes are hashed onto a ring; a key belongs to the next node clockwise. Adding or removing a node only moves the keys in its arc, instead of remapping everything like hash % n does.
A consensus algorithm: nodes elect a leader, the leader appends entries to a replicated log, and an entry is committed once a majority has stored it. That is how replicas agree on the same state.
Virtual nodes: each physical machine takes many positions on the hash ring instead of one, which evens out the key distribution and spreads the load of a departing node across all the others.
Write-ahead log: every write is appended to a file and flushed to disk before the client gets its acknowledgement, so a crash cannot lose an acknowledged write. That flush is why writes over the wire cost far more than reads.
A contiguous slice of the sorted keyspace, owned by one group of nodes. TiKV and CockroachDB split their data this way and move ranges between nodes to rebalance, which is what makes the node set dynamic.
Go’s unit of concurrency: a function running independently, scheduled by the Go runtime onto OS threads rather than getting one each. They start at a few kilobytes of stack, so running thousands of them is routine.