Global Accelerator
π What is AWS Global Accelerator?
AWS Global Accelerator is a network-level traffic manager that improves the availability and performance of your global applications by routing user traffic through the AWS global network and accelerating it to your applicationβs regional endpoints.
Instead of relying on the public internet, traffic uses AWS backbone, with static IPs and automatic failover.
π§ How It Works
Core Components:
| Component |
Description |
| Accelerator |
The resource with 2 static IP addresses (global entry points) |
| Listener |
Port mapping (e.g., TCP 80/443) |
| Endpoint Group |
One per AWS Region (e.g., us-east-1, ap-south-1) |
| Endpoints |
Can be ALB, NLB, EC2 IPs, or Elastic IPs |
Think of Global Accelerator as route optimization + HA failover across regions and endpoints.
β
Use Cases
| Use Case |
Why Use Global Accelerator |
| π οΈ Multi-region API |
Direct users to closest healthy region with lowest latency |
| π Global SaaS/Web app |
Provide static IPs for DNS simplification and firewall allowlisting |
| π§ͺ Real-time gaming/VoIP |
Lower jitter, packet loss, and latency |
| π¦ Software download/CDN backend |
Improve performance for global binary delivery |
| π§° Disaster recovery/failover routing |
Reroute traffic to another region automatically |
π Global Accelerator vs CloudFront
| Feature |
Global Accelerator |
CloudFront |
| Level |
Network Layer (TCP/UDP) |
Application Layer (HTTP/HTTPS) |
| Protocol Support |
TCP, UDP |
HTTP, HTTPS only |
| Latency Optimization |
β
Yes (BGP + Anycast + AWS Backbone) |
β
Yes (via caching at edge) |
| Content Caching |
β No |
β
Yes (full CDN) |
| Static IPs |
β
Yes |
β No |
| Use Case |
APIs, gaming, real-time apps |
Static sites, streaming, media delivery |
# 1. Create the Global Accelerator
resource "aws_globalaccelerator_accelerator" "main" {
name = "yuva-global-accelerator"
ip_address_type = "IPV4"
enabled = true
}
# 2. Add a listener
resource "aws_globalaccelerator_listener" "http_listener" {
accelerator_arn = aws_globalaccelerator_accelerator.main.id
port_ranges {
from_port = 80
to_port = 80
}
protocol = "TCP"
client_affinity = "NONE"
}
# 3. Endpoint Group for us-east-1
resource "aws_globalaccelerator_endpoint_group" "useast1" {
listener_arn = aws_globalaccelerator_listener.http_listener.id
endpoint_group_region = "us-east-1"
endpoint_configuration {
endpoint_id = aws_lb.useast1.arn
weight = 128
}
}
# 4. Endpoint Group for ap-south-1
resource "aws_globalaccelerator_endpoint_group" "apsouth1" {
listener_arn = aws_globalaccelerator_listener.http_listener.id
endpoint_group_region = "ap-south-1"
endpoint_configuration {
endpoint_id = aws_lb.apsouth1.arn
weight = 128
}
}
Replace aws_lb.useast1 with your actual ALB/NLB or EC2 IPs.
π Security & Compliance Features
| Feature |
Description |
| β
Static IPs |
Use in firewall rules or allowlists |
| β
Health Checks |
Remove failed endpoints automatically |
| β
Regional Failover |
Fast routing to healthy endpoints |
| β
Traffic Distribution |
Weights or failover-based |
| β
AWS Shield Integration |
Built-in DDoS protection |
π‘ Key Benefits
| Feature |
Benefit |
| π Global Static IPs |
No need to manage IPs across regions |
| π£οΈ AWS Backbone Routing |
Faster and more reliable than public internet |
| π Automatic Failover |
100% uptime without manual intervention |
| β‘ Latency Optimization |
Routes to closest healthy endpoint |
π° Pricing (Simplified)
| Cost Component |
Notes |
| Accelerator fee |
$0.025 per hour |
| Data transfer out via GA |
~$0.015β0.12 per GB depending on region |
π§ Often cheaper than public internet latency, especially for performance-sensitive apps.
β
TL;DR Summary
| Feature |
Global Accelerator |
| Level |
Network (TCP/UDP) |
| Static IPs |
β
Yes |
| Best For |
Real-time apps, global APIs, gaming |
| Traffic Optimization |
β
Fast path via AWS backbone |
| Failover |
β
Auto failover between endpoints/regions |
| Terraform Support |
β
Yes (aws_globalaccelerator_*) |