Is Redis list or set pop method thread safe?

后端 未结 1 1800
梦毁少年i
梦毁少年i 2021-01-02 19:39

I\'m building out a queuing service which will be multi-threaded. I need to make sure that Redis, our data backend, has a thread safe pop function for either lists or set ty

相关标签:
1条回答
  • 2021-01-02 20:37

    from the benchmark page

    Redis is a single-threaded server. It is not designed to benefit from multiple CPU cores. People are supposed to launch several Redis instances to scale out on several cores if needed. It is not really fair to compare one single Redis instance to a multi-threaded data store.

    so as every command gets queued in a single thread you should be ok as there will never be two commands executing in parallel

    0 讨论(0)
提交回复
热议问题