Target groups for your Gateway Load Balancers
Each target group is used to route requests to one or more registered targets. When you create a listener, you specify a target group for its default action. Traffic is forwarded to the target group that's specified in the listener rule. You can create different target groups for different types of requests.
You define health check settings for your Gateway Load Balancer on a per target group basis. Each target group uses the default health check settings, unless you override them when you create the target group or modify them later on. After you specify a target group in a rule for a listener, the Gateway Load Balancer continually monitors the health of all targets registered with the target group that are in an Availability Zone enabled for the Gateway Load Balancer. The Gateway Load Balancer routes requests to the registered targets that are healthy. For more information, see Health checks for your target groups.
Contents
Routing configuration
Target groups for Gateway Load Balancers support the following protocol and port:
-
Protocol: GENEVE
-
Port: 6081
Target type
When you create a target group, you specify its target type, which determines how you specify its targets. After you create a target group, you cannot change its target type.
The following are the possible target types:
instance
-
The targets are specified by instance ID.
ip
-
The targets are specified by IP address.
When the target type is ip
, you can specify IP addresses from one
of the following CIDR blocks:
You can't specify publicly routable IP addresses.
Registered targets
Your Gateway Load Balancer serves as a single point of contact for clients, and distributes incoming traffic across its healthy registered targets. Each target group must have at least one registered target in each Availability Zone that is enabled for the Gateway Load Balancer. You can register each target with one or more target groups.
If demand increases, you can register additional targets with one or more target groups in order to handle the demand. The Gateway Load Balancer starts routing traffic to a newly registered target as soon as the registration process completes.
If demand decreases, or you need to service your targets, you can
deregister targets from your target groups. Deregistering a target removes it from
your
target group, but does not affect the target otherwise. The Gateway Load Balancer
stops routing
traffic to a target as soon as it is deregistered. The target enters the
draining
state until in-flight requests have completed. You can
register the target with the target group again when you are ready for it to resume
receiving traffic.
Target group attributes
The following are the target group attributes:
deregistration_delay.timeout_seconds
-
The amount of time for Elastic Load Balancing to wait before changing the state of a deregistering target from
draining
tounused
. The range is 0-3600 seconds. The default value is 300 seconds.
Deregistration delay
When you deregister an instance, the Gateway Load Balancer stops creating new connections to the instance. The Gateway Load Balancer uses connection draining to ensure that in-flight traffic completes on the existing connections. If the deregistered instance stays healthy and an existing connection is not idle, the Gateway Load Balancer can continue to send traffic to the instance. To ensure that existing connections are closed, you can verify that the instance is unhealthy before you deregister it, or you can periodically close client connections.
The initial state of a deregistering target is draining
. By default,
the Gateway Load Balancer changes the state of a deregistering target to unused
after 300 seconds. To change the amount of time that the Gateway Load Balancer waits
before
changing the state of a deregistering target to unused
, update the
deregistration delay value. We recommend that you specify a value of at least 120
seconds to ensure that requests are completed.
To update the deregistration delay value using the AWS CLI
Use the modify-target-group-attributes command.