|
|
|
|
|
by kiennt
4891 days ago
|
|
Redis used event loop model to handle requests. So basically, at any time, there is only 1 thread change data. This model make redis fast and still guarantee data is atomic. I wonder if thredis use thread how thredis solve that issue? |
|
If Redis could actually process requests in parallel instead of one-at-a-time, this would not be an issue and Redis could actually have a reliable latency profile under load.
About the only solution in this case is to turn Redis into a distributed system via sharding/slaves, and as soon as you do that, you lose Redis's guarantees around atomicity. Furthermore, Redis provides few tools that are really essential in a distributed system, like read repair/quorums or a failover system that isn't a joke (i.e. sentinel, although redis-failover could fit the bill)