I remember the earlier version of the Redis server was single-threaded.
Is the latest stable version of Redis, 6.2.6 still single-threaded?
When 2 clients call INCR
command for the same key at the same timestamp, does Redis use a single thread to sequentially perform INCR
one after another, or does Redis use 2 threads with a lock for synchronization?
Redis is, mostly, a single-threaded server from the POV of commands execution
Redis can now optionally use threads to handle I/O, allowing to serve 2 times as much operations per second in a single instance when pipelining cannot be used.
An still opened issue for redis 7 [FEATURE] Make redis 7 multi-threaded
As I understand from all these links I would answer your question saying redis uses just one thread, not two with locks and syncs.