wenfh2020 / wenfh2020.github.io

make blog : github + jekyll
MIT License
4 stars 3 forks source link

探索惊群 ⑤ - nginx - NGX_EXCLUSIVE_EVENT #119

Open wenfh2020 opened 2 years ago

wenfh2020 commented 2 years ago

https://wenfh2020.com/2021/10/11/thundering-herd-nginx-epollexclusive/

EPOLLEXCLUSIVE 是 2016 年 4.5+ 内核新添加的一个 epoll 的标识(代码改动较小,详看:github)。它解决了多个进程/线程通过 epoll_ctl 添加共享 fd 引发的惊群问题,保证一个事件发生时,只唤醒一个正在 epoll_wait 阻塞等待唤醒的进程/线程。而 Ngnix 在...