I’m using Redis 6.2.5, and if many clients access the same nested key read write action at the same time, all redis db values will be lost. The data of some other clients was lost. I tried multi and exec but they didn’t work, then I tried cluster but the error didn’t go away.
What can be done to resolve this problem?
2
Answers
Redis was a single-threaded opensource application. As a result, data read and write operations were typically completed in less than 100 milliseconds. If Redis crashes, all data will be lost. So I'm using Redis cloud enterprise. so it's working properly.
You can rename the flushdb and flushall commands to stop someone from accidentally calling them if you think it is accidental.
Even better would be to setup Redis ACLs such that the application users only have the minimum access necessary
If your instance is open to the internet and passwordless there are many malwares that will do this or worse, so security should help.
The other possibility is that the instance is crashing and persistence is not enabled.