Home Arrow Icon Knowledge base Arrow Icon Global Arrow Icon What are the best practices for configuring health checks in Global Accelerator


What are the best practices for configuring health checks in Global Accelerator


Best practices for configuring health checks in AWS Global Accelerator focus on ensuring accurate, secure, and efficient monitoring of endpoint health to maintain high availability and optimal traffic routing. Below are detailed guidelines based on AWS documentation and related best practices:

Key Best Practices for Configuring Health Checks in Global Accelerator

1. Use Appropriate Health Check Protocols and Ports

- Choose the health check protocol (TCP, HTTP, or HTTPS) that best reflects the nature of your application and the endpoint's ability to respond. TCP health checks verify network-level connectivity by sending SYN packets, while HTTP/HTTPS checks simulate actual HTTP GET requests to application endpoints[6][9].
- Configure the health check port to match the listener port on your accelerator for consistency. If you use a different port for health checks, ensure that firewall and security group rules restrict access to only the IP ranges used by Route 53 health checkers to prevent exposing the port publicly[1][4].
- For EC2 instances or Elastic IP endpoints with UDP listeners, Global Accelerator performs TCP health checks on the listener port, so ensure a TCP server is running on that port; otherwise, endpoints will be marked unhealthy[1].

2. Ensure Security and Access for Health Checks

- Allow inbound traffic from the IP addresses associated with Amazon Route 53 health checkers in your firewall and router configurations. This is critical for health checks to succeed, especially for EC2 instance or Elastic IP endpoints[1][4].
- When using a non-default health check port, restrict access to that port only to the Route 53 health check IP ranges to avoid security risks[1].
- Regularly review and update security group rules to accommodate any changes in IP address ranges used by Route 53 health checkers.

3. Configure Health Check Timing Parameters Thoughtfully

- Set the health check interval (the time between checks) based on your application's tolerance for downtime and the criticality of the endpoint. Shorter intervals detect failures faster but increase load and cost, while longer intervals reduce load but delay failure detection[5].
- Configure the threshold count (number of consecutive successes or failures before changing endpoint health status) to balance sensitivity and stability. A common default is 3, which provides a good trade-off between false positives and detection speed[1][9].
- Use default timeout values unless you have specific reasons to adjust them. For example, the TCP health check timeout is fixed at 3 seconds in Global Accelerator[6].

4. Align Health Checks with Endpoint Types

- For Network Load Balancer (NLB) or Application Load Balancer (ALB) endpoints, configure health checks on the load balancer itself rather than in Global Accelerator, as Global Accelerator uses the load balancer's health status to determine endpoint health[1].
- For EC2 instances or Elastic IP addresses, configure health checks directly in Global Accelerator, specifying appropriate ports and protocols that reflect the actual service availability[1].

5. Use Meaningful Health Check Paths for HTTP/HTTPS

- When using HTTP or HTTPS health checks, specify a URI path that accurately represents the health of your application (e.g., a dedicated health check endpoint rather than the homepage). This ensures the health check reflects application-level readiness, not just network availability[6].
- Keep the URI path concise and valid, starting with a forward slash and containing allowed characters[6].

6. Monitor Health Check Metrics and Logs

- Regularly review health check results and CloudWatch metrics to identify patterns or recurring failures. This helps in proactive troubleshooting and capacity planning[5].
- Set up CloudWatch alarms to notify your team immediately when endpoints become unhealthy or recover, enabling rapid response to incidents[5].

7. Implement Failover and Recovery Strategies

- Leverage Global Accelerator's ability to route traffic only to healthy endpoints for instant failover.
- Test failover and failback scenarios to ensure smooth traffic transitions during endpoint outages and recovery[5][8].

8. Keep Health Checks Updated

- Periodically review and update health check configurations as your application evolves, including changes in ports, protocols, or health check paths.
- Remove health checks for endpoints no longer in use to avoid unnecessary monitoring and potential security exposure[5].

By following these best practices, you ensure that Global Accelerator health checks provide accurate, secure, and timely information about endpoint health, enabling reliable traffic routing and high availability for your applications.

Citations:
[1] https://docs.aws.amazon.com/global-accelerator/latest/dg/about-endpoint-groups-health-check-options.html
[2] https://aws.amazon.com/blogs/networking-and-content-delivery/best-practices-for-deployment-with-aws-global-accelerator/
[3] https://docs.aws.amazon.com/global-accelerator/latest/dg/introduction-how-it-works.html
[4] https://repost.aws/knowledge-center/global-accelerator-unhealthy-endpoints
[5] https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/best-practices-healthchecks.html
[6] https://www.alibabacloud.com/help/en/ga/user-guide/enable-and-manage-health-checks
[7] https://support.huaweicloud.com/intl/en-us/usermanual-ga/ga_03_5002.html
[8] https://tutorialsdojo.com/aws-global-accelerator/
[9] https://boto3.amazonaws.com/v1/documentation/api/1.16.27/reference/services/globalaccelerator.html