Mercurial > hg > nginx
view src/event/modules/ngx_iocp_module.h @ 6153:4f6efabcb09b
The "reuseport" option of the "listen" directive.
When configured, an individual listen socket on a given address is
created for each worker process. This allows to reduce in-kernel lock
contention on configurations with high accept rates, resulting in better
performance. As of now it works on Linux and DragonFly BSD.
Note that on Linux incoming connection requests are currently tied up
to a specific listen socket, and if some sockets are closed, connection
requests will be reset, see https://lwn.net/Articles/542629/. With
nginx, this may happen if the number of worker processes is reduced.
There is no such problem on DragonFly BSD.
Based on previous work by Sepherosa Ziehau and Yingqi Lu.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Wed, 20 May 2015 15:51:56 +0300 |
parents | d620f497c50f |
children |
line wrap: on
line source
/* * Copyright (C) Igor Sysoev * Copyright (C) Nginx, Inc. */ #ifndef _NGX_IOCP_MODULE_H_INCLUDED_ #define _NGX_IOCP_MODULE_H_INCLUDED_ typedef struct { int threads; int post_acceptex; int acceptex_read; } ngx_iocp_conf_t; extern ngx_module_t ngx_iocp_module; #endif /* _NGX_IOCP_MODULE_H_INCLUDED_ */