哪个配置/优化更好:显式限制keepalive_timeout
or或允许Nginx自行终止keepalive连接?
我已经看到有关keepalive_timeout
Nginx指令的两个相互矛盾的建议。它们如下:
# How long to allow each connection to stay idle; longer values are better
# for each individual client, particularly for SSL, but means that worker
# connections are tied up longer. (Default: 65)
keepalive_timeout 20;
和
# You should remove keepalive_timeout from your formula.
# Nginx closes keepalive connections when the
# worker_connections limit is reached.
该Nginx的 文档为keepalive_timeout
没有提及自动查杀,而我只看到这一建议一次,但它令我着迷。
该服务器专门提供TLS保护的连接,并且所有未加密的连接都会立即重新路由到https://
同一URL 的版本。