Search code examples
redisredis-cluster

Is redis server version 6.2.6 still single threaded?


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?


Solution

  • Pitfalls and misconceptions

    Redis is, mostly, a single-threaded server from the POV of commands execution

    All Redis 6.X.X release notes

    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.