accept_mutex on | off ;
on(default):nginx的多个woker进程将以串行方式接入新连接,大量并发时不如off。
off :新连接将通报给所有worker进程。
reuseport:linux 内核版本3.9+支持且 accept_mutex off; ,大量并发时reuserport的方式性能更好。 每秒处理的请求数、延迟、cpu负载均比较优秀。
reuseport 配置方式
参考:1、https://www.nginx.com/blog/socket-sharding-nginx-release-1-9-1/
2、https://tengine.taobao.org/nginx_docs/cn/docs/ngx_core_module.html#accept_mutex