AWS Global Accelerator
About AWS Global Accelerator
- AWS Global Accelerator is a networking service that improves the availability and performance of your applications by directing traffic through AWS's global network infrastructure.
- It provides fast, consistent network performance and automatically reroutes traffic to healthy endpoints in case of failure, ensuring high availability and low latency.
- Here's a link to the developer guide
IP Anycast
- The global accelerator is using a networking technology called IP Anycast.
- It is a networking scheme that allows a single IP address to be shared with multiple hosts (called endpoints).
- When a packet is sent to an anycast IP address, the packet is delivered to JUST ONE of the hosts that share this IP address, usually the one "nearest" (in routing terms) to the sender.
- There are no really specific ranges of IPv4 addresses that are spcific to anycast, nor are there ant specific routing protocols for IP anycast.
- It is built by counfiguring routers to send a packet to the host that is nearest to the sender, using their normal routing decision making algorithms.
- Typically, routers choose the lowest number of BGP network hops, using BGP as-path attribute
- If the nearest server becomes unavailable, routers automatically redirect traffic to the next closest server.
Global Accelerator view
Here's how this could look like:
So, how does it work?
- Client requests (tcp connections) are directed to a static IP address you get when you create an accelerator(see definition here)
- The request will reach an Edge location by means of IP anycast. This would be the nearest edge location to the request initiator.
- At the edge location, the tcp connection is terminated, and a new one is connected towards your endpoint (this is where your application is).
- From the edge location the traffic is inside AWS, so the network is congestion free, and latency is lower (also because of the new tcp connection.)
- The endpoint is the resource where global accelerator sends the traffic to.
It can be a load balancer (network or API), an ec2 server etc. - You would (for example) create multiple endpoint in different regions, and global-accelerator will route user traffic to an endpoint in a regions close to the user.