`nlb` Map
The nlb section contains parameters related to integrating your service with a Network Load Balancer.
The Network Load Balancer is enabled only if you specify the `nlb` field. Note that for a Load-Balanced Web Service,
at least one of Application Load Balancer and Network Load Balancer must be enabled.
nlb.`port` String
Required. The port and protocol for the Network Load Balancer to listen on.
Accepted protocols include `tcp`, `udp` and `tls`. If the protocol is not specified, `tcp` is used by default. For example:
```yaml
nlb:
port: 80
```
will listen on port 80 for `tcp` requests. This is the same as
```yaml
nlb:
port: 80/tcp
```
You can easily enable TLS termination. For example:
```yaml
nlb:
port: 443/tls
```
nlb.`healthcheck` Map
Specify the health check configuration for your Network Load Balancer.
```yaml
nlb:
healthcheck:
port: 80
healthy_threshold: 3
unhealthy_threshold: 2
interval: 15s
timeout: 10s
```
nlb.healthcheck.`port` String
The port that the health check requests are sent to. Specify this if your health check should be performed on a different port than the container target port.
nlb.healthcheck.`healthy_threshold` Integer
The number of consecutive health check successes required before considering an unhealthy target healthy. The default is 3. Range: 2-10.
nlb.healthcheck.`unhealthy_threshold` Integer
The number of consecutive health check failures required before considering a target unhealthy. The default is 3. Range: 2-10.
nlb.healthcheck.`grace_period` Duration
The amount of time to ignore failing target group healthchecks on container start. The default is 60s. This can be useful to fix deployment issues for containers which take a while to become healthy and begin listening for incoming connections, or to speed up deployment of containers guaranteed to start quickly.
!!! info
Per the [docs](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/target-group-health-checks.html) at the time of this writing, 'unhealthy threshold' is required to be equal to 'healthy threshold' for a Network Load Balancer.
nlb.healthcheck.`interval` Duration
The approximate amount of time, in seconds, between health checks of an individual target. The value can be 10s or 30s. The default is 30s.
nlb.healthcheck.`timeout` Duration
The amount of time, in seconds, during which no response from a target means a failed health check. The default is 10s.
nlb.`target_container` String
A sidecar container that takes the place of a service container.
nlb.`target_port` Integer
The container port that receives traffic. Specify this field if the container port is different from `nlb.port`, the listener port.
nlb.`ssl_policy` String
The security policy that defines which protocols and ciphers are supported. To learn more, see [this doc](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/create-tls-listener.html#describe-ssl-policies).
nlb.`stickiness` Boolean
Indicates whether sticky sessions are enabled.
nlb.`alias` String or Array of Strings
Domain aliases for your service.
```yaml
# String version.
nlb:
alias: example.com
# Alteratively, as an array of strings.
nlb:
alias: ["example.com", "v1.example.com"]
```
nlb.`additional_listeners` Array of Maps
Configure multiple NLB listeners.
{% include 'nlb-additionallisteners.en.md' %}