2024-07-08
한어Русский языкEnglishFrançaisIndonesianSanskrit日本語DeutschPortuguêsΕλληνικάespañolItalianoSuomalainenLatina
[Redis thread model]
【Big key troubleshooting and solutions】
Why single thread: CPU is not the performance bottleneck (memory and network), single thread can meet business requirements
Network IO and key-value pair reading and writing are all done by one thread
Persistence (aof, rdb), asynchronous deletion (big key), data replication (master-slave, sentinel, cluster) use multithreading
detailed:【Big key troubleshooting and solutions】
Normally, the del command can quickly delete data. However, when the key to be deleted is a very large object, such as a hash set containing tens of thousands of elements, the del command will cause the Redis main thread to freeze.
The Big Key problem is essentially a Big Value problem
for((i=1;i