Are Redis Updates Updated?

If I push something into a list in Redis and then pop from that list, is it guaranteed that I will get the element that I clicked earlier, or is it possible for reading to happen before writing?

+5
source share
1 answer

Redis runs on a single thread (with the exception of markup when saving the background, but that doesn’t matter), so any request that you send later will definitely be launched later. Thus, you will see the value that you clicked.

(Although, according to another thought, it might be possible to provoke a failure if you are sick and loyal to the cause to make it unsuccessful as intended. But this will require sending your requests through separate connections, which does not happen by chance during normal operation.)

+4
source

All Articles