是否应该从Nginx配置中删除“ keepalive_timeout”?


14

哪个配置/优化更好:显式限制keepalive_timeoutor或允许Nginx自行终止keepalive连接?

我已经看到有关keepalive_timeoutNginx指令的两个相互矛盾的建议。它们如下:

# 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 的版本。

Answers:


By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.