Open wenfh2020 opened 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 在...
https://wenfh2020.com/2021/10/11/thundering-herd-nginx-epollexclusive/
EPOLLEXCLUSIVE 是 2016 年 4.5+ 内核新添加的一个 epoll 的标识(代码改动较小,详看:github)。它解决了多个进程/线程通过 epoll_ctl 添加共享 fd 引发的惊群问题,保证一个事件发生时,只唤醒一个正在 epoll_wait 阻塞等待唤醒的进程/线程。而 Ngnix 在...