Skip to content

Commit

Permalink
Update NLB idle timeout information
Browse files Browse the repository at this point in the history
  • Loading branch information
aledbf committed Aug 26, 2020
1 parent 3215e69 commit 8a80bcf
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 12 deletions.
1 change: 0 additions & 1 deletion deploy/static/provider/aws/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,6 @@ kind: Service
metadata:
annotations:
service.beta.kubernetes.io/aws-load-balancer-backend-protocol: tcp
service.beta.kubernetes.io/aws-load-balancer-connection-idle-timeout: '60'
service.beta.kubernetes.io/aws-load-balancer-cross-zone-load-balancing-enabled: 'true'
service.beta.kubernetes.io/aws-load-balancer-type: nlb
labels:
Expand Down
10 changes: 3 additions & 7 deletions docs/deploy/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,15 +100,11 @@ kubectl apply -f deploy-tls-termination.yaml

##### NLB Idle Timeouts

In some scenarios users will need to modify the value of the NLB idle timeout. Users need to ensure the idle timeout is less than the [keepalive_timeout](http://nginx.org/en/docs/http/ngx_http_core_module.html#keepalive_timeout) that is configured for NGINX.
By default NGINX `keepalive_timeout` is set to `75s`.

The default NLB idle timeout works for most scenarios, unless the NGINX [keepalive_timeout](http://nginx.org/en/docs/http/ngx_http_core_module.html#keepalive_timeout) has been modified, in which case the annotation
Idle timeout values for TCP flows is 350 seconds and [cannot be modified](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/network-load-balancers.html#connection-idle-timeout).

`service.beta.kubernetes.io/aws-load-balancer-connection-idle-timeout` value must be modified to ensure it is less than the configured `keepalive_timeout`.
For this reason, you need to ensure the [keepalive_timeout](http://nginx.org/en/docs/http/ngx_http_core_module.html#keepalive_timeout) configured value is less than 350 seconds to work as expected.

!!! note ""
An idle timeout of `3600` is recommended when using WebSockets
By default NGINX `keepalive_timeout` is set to `75s`.

More information with regards to timeouts for can be found in the [official AWS documentation](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/network-load-balancers.html#connection-idle-timeout)

Expand Down
4 changes: 0 additions & 4 deletions hack/generate-deploy-scripts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,6 @@ controller:
service.beta.kubernetes.io/aws-load-balancer-backend-protocol: "tcp"
service.beta.kubernetes.io/aws-load-balancer-type: nlb
service.beta.kubernetes.io/aws-load-balancer-cross-zone-load-balancing-enabled: "true"
# Ensure the ELB idle timeout is less than nginx keep-alive timeout. By default,
# NGINX keep-alive is set to 75s. If using WebSockets, the value will need to be
# increased to '3600' to avoid any potential issues.
service.beta.kubernetes.io/aws-load-balancer-connection-idle-timeout: "60"
EOF

echo "${NAMESPACE_VAR}
Expand Down

0 comments on commit 8a80bcf

Please sign in to comment.