Are redis operations on data structures thread safe

Soumya Simanta picture Soumya Simanta · Jun 14, 2013 · Viewed 14.8k times · Source

How does Redis handle multiple threads (from different clients) updating the same data structure in Redis ? What is the recommended best practice for such a use case?

Answer

andrefsp picture andrefsp · Jun 14, 2013

if you read the Little redis book at some point this sentence comes.

"You might not know it, but Redis is actually single-threaded, which is how every command is guaranteed to be atomic. While one command is executing, no other command will run."

Have a look in http://openmymind.net/2012/1/23/The-Little-Redis-Book/ for more information

Regards