comparison auto/unix @ 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 0371ef1c24a9
children acba1656c474
comparison
equal deleted inserted replaced
6152:3c344ea7d88b 6153:4f6efabcb09b
303 ngx_feature_run=no 303 ngx_feature_run=no
304 ngx_feature_incs="#include <sys/socket.h>" 304 ngx_feature_incs="#include <sys/socket.h>"
305 ngx_feature_path= 305 ngx_feature_path=
306 ngx_feature_libs= 306 ngx_feature_libs=
307 ngx_feature_test="setsockopt(0, SOL_SOCKET, SO_SETFIB, NULL, 0)" 307 ngx_feature_test="setsockopt(0, SOL_SOCKET, SO_SETFIB, NULL, 0)"
308 . auto/feature
309
310
311 ngx_feature="SO_REUSEPORT"
312 ngx_feature_name="NGX_HAVE_REUSEPORT"
313 ngx_feature_run=no
314 ngx_feature_incs="#include <sys/socket.h>"
315 ngx_feature_path=
316 ngx_feature_libs=
317 ngx_feature_test="setsockopt(0, SOL_SOCKET, SO_REUSEPORT, NULL, 0)"
308 . auto/feature 318 . auto/feature
309 319
310 320
311 ngx_feature="SO_ACCEPTFILTER" 321 ngx_feature="SO_ACCEPTFILTER"
312 ngx_feature_name="NGX_HAVE_DEFERRED_ACCEPT" 322 ngx_feature_name="NGX_HAVE_DEFERRED_ACCEPT"