Home Arrow Icon Knowledge base Arrow Icon Global Arrow Icon How do you configure endpoint weights for both standard and custom routing accelerators


How do you configure endpoint weights for both standard and custom routing accelerators


To configure endpoint weights for both standard and custom routing accelerators in AWS Global Accelerator, you manage how traffic is proportionally distributed to the endpoints within an endpoint group by assigning weights to each endpoint. Here is detailed guidance on how to do this for both accelerator types:

Standard Routing Accelerators

What Are Endpoint Weights?

- Endpoint weights are numeric values from 0 to 255 that determine the proportion of traffic routed to each endpoint within an endpoint group.
- By default, each endpoint has a weight of 128.
- The Global Accelerator calculates the sum of all endpoint weights in an endpoint group and routes traffic to each endpoint based on the ratio of its weight to the total sum.
- For example, if endpoints have weights 4, 5, 5, and 6 (total 20), traffic is routed 4/20 to the first endpoint, 5/20 to the second and third, and 6/20 to the last[2][3][6][10].

How to Configure Endpoint Weights

- In the AWS Global Accelerator console, select your accelerator and listener.
- Choose the endpoint group to which you want to add or edit endpoints.
- Add or edit an endpoint and specify a weight value between 0 and 255.
- Setting a weight to 0 means the endpoint will not receive traffic.
- You can adjust weights dynamically to shift traffic distribution, such as for canary releases by gradually increasing the weight of a new version endpoint while decreasing the old one[2][6].
- Client IP address preservation can be enabled optionally, but note that Global Accelerator might override endpoint weights to avoid connection collisions when this feature is enabled[2][3].

Additional Considerations

- Traffic dials are configured at the endpoint group level to control the overall percentage of traffic sent to that group, while weights control traffic distribution among endpoints within the group.
- Health checks affect routing: traffic is only distributed to healthy endpoints; if an endpoint becomes unhealthy, weights are recalculated among the remaining healthy endpoints[10].

Custom Routing Accelerators

What Are Custom Routing Endpoints?

- Endpoints are VPC subnets associated with the accelerator.
- Traffic is routed to EC2 instances within these subnets based on port mappings.

Configuring Endpoint Weights

- For custom routing listeners, you specify weights for each endpoint (subnet) to control the ratio of traffic distributed.
- Valid weights are from 0 to 255, with a default of 255.
- The Global Accelerator sums the weights of all endpoints in the group and distributes traffic proportionally.
- Setting an endpoint weight to 0 stops traffic distribution to that endpoint.
- This allows for load balancing, gradual traffic migration (canary releases), and improved resource utilization[6][9].

How to Configure

- Use the AWS console, CLI, or SDKs to add custom routing endpoints to an endpoint group.
- Specify the weight for each subnet endpoint when adding or updating endpoints.
- Ensure the listener port range is sufficient to cover the subnet port requirements.
- Enable traffic to specific ports or all destinations within the subnet using the AllowCustomRoutingTraffic API if needed[9].

Summary of Key Points

- Endpoint weights control proportional traffic distribution within an endpoint group for both standard and custom routing accelerators.
- Weights range from 0 (no traffic) to 255 (maximum traffic share).
- Adjust weights to manage load balancing, failover, and gradual deployment strategies.
- For standard accelerators, weights apply to resources like load balancers, EC2 instances, or Elastic IPs.
- For custom routing accelerators, weights apply to VPC subnet endpoints.
- Client IP preservation and health checks influence routing behavior and may override weights in some cases.

This configuration flexibility allows precise control over how traffic is routed globally to optimize performance, availability, and deployment strategies[2][3][6][9][10].

Citations:
[1] https://docs.aws.amazon.com/global-accelerator/latest/dg/about-endpoints-endpoint-weights.html
[2] https://docs.aws.amazon.com/global-accelerator/latest/dg/about-endpoints-adding-endpoints.html
[3] https://awscli.amazonaws.com/v2/documentation/api/latest/reference/globalaccelerator/add-endpoints.html
[4] https://repost.aws/knowledge-center/global-accelerator-failover-different-region
[5] https://www.alibabacloud.com/help/en/ga/user-guide/create-and-manage-the-endpoint-groups-of-intelligent-routing-listeners
[6] https://www.alibabacloud.com/help/en/ga/user-guide/overview-4/
[7] https://boto3.amazonaws.com/v1/documentation/api/1.21.9/reference/services/globalaccelerator.html
[8] https://cloudchipr.com/blog/aws-global-accelerator
[9] https://metacpan.org/pod/Paws::GlobalAccelerator
[10] https://docs.aws.amazon.com/global-accelerator/latest/dg/introduction-how-it-works.html
[11] https://www.alibabacloud.com/help/en/ga/getting-started/accelerate-transmission-of-network-traffic-destined-for-a-specified-domain-name