美文网首页
Redis API的使用和理解之单线程架构

Redis API的使用和理解之单线程架构

作者: Change_6556 | 来源:发表于2019-10-20 11:18 被阅读0次

一个瞬间只执行一个命令
Redis为什么这么快
1.纯内存
2.非阻塞IO epoll IO多路复用
3.皮面线程切换和竞态消耗

单线程epoll模型
1.一次只运行一条命令 100ns
2.拒绝长命令
keys flushall,flushad,slow lua script,muti.exec,operate bing value (collection)
3.其实不是单线程
fysnc file descriptor
close file descriptor 会有独立的线程做

相关文章

网友评论

      本文标题:Redis API的使用和理解之单线程架构

      本文链接:https://www.haomeiwen.com/subject/bpmomctx.html