Nginx 설정에서`keepalive_timeout`을 제거해야합니까? tied up longer. (Default: 65) keepalive_timeout 20; 과 #

더 나은 구성 / 최적화는 다음 중 어느 것입니까? 명시 적으로 keepalive_timeoutNginx가 자체적으로 연결 유지 연결을 강제 종료하도록 허용합니까?

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 버전으로 다시 라우팅됩니다 .



답변

Nginx는 worker_connections 제한에 도달하면 연결 유지 연결을 닫습니다.

사실입니다.