Route 53 vs Cloudfront vs Global Accelerator
Although the some of the functionalities of these aws services, but actually the have different use cases.
Route 53 is a DNS web services, this aws service allows us to handle route failover and direct traffic base on the weight, geographic, latency etc.
The confusion comes from the similarity of the geographic records with cloudfront’s geographic restriction.
And the latency records with the aws global accelerator.
Cloudfront is an aws cdn service (global edge network), it makes use of edge locations to cache the static files requested via HTTP protocol for a TTL, and the origin that it serves for can be S3 bucket, ALB, EC2, or S3 Website.
Geo restriction can be set on Cloudfront by set up a whitelist/blacklist to restrict the geo that can access the content.
In terms of security, it is backed by AWS shield and AWS global network, also users can set up CloudFront signed URL / Cookies (for a batch of files) to allow access no matter the origin. It makes use of an account-wide key pair that manages by the root account.
Also, field-level encryption is available using asymmetric keys.
For availability, we can set up origin groups across regions (1 primary origin, 1 secondary origin) to do failover.
For direction, it can be configured to redirect to different origins based on the path patterns (/images/*).
The global accelerator also makes use of edge locations, but it used it as a ‘special channel’ to direct requests to AWS internal network, we can configure it to point to our VPC and a specific AWS resource so that the requests don’t need to go through the hops in the public network, which has more risks and slower, etc.
It is fast because it makes use of anycast IP (other than unicast IP) which means all the routers hold the same IP addresses and the user’s requests will be directed to the nearest one.
Two static anycast IPs will be created for our application and it will direct the traffic to the edge locations and the edge locations will direct the traffic through the AWS internal network.
The global accelerator works with HTTP protocol and lower level protocol such as HTTP / UDP, it is a good fit to enhance performance for gaming, etc.
Moreover, it also offers health checks, weight configuration for endpoint groups, and failover.