Lesson 3 of 3 Amazon CloudFront and AWS Global Accelerator

Improving Global Availability with AWS Global Accelerator

This lesson explains how Global Accelerator improves the availability and performance of applications with users worldwide by routing their traffic over the AWS global network.

Learning outcomes

After completing this lesson, you will be able to:

  • Describe static anycast IP addresses and edge routing.
  • Explain how traffic dials and endpoint weights control traffic.
  • Choose between Global Accelerator and CloudFront.

How it works

AWS Global Accelerator gives an application two static anycast IPv4 addresses, or addresses the customer brings, which are announced from AWS edge locations worldwide. A user's traffic enters the AWS network at the nearest edge location and crosses the AWS backbone to endpoint groups in one or more Regions, containing Application Load Balancers, Network Load Balancers, EC2 instances or Elastic IP addresses.

Global Accelerator health-checks the endpoints continuously and moves traffic away from unhealthy endpoints or Regions within seconds. Because clients keep using the same IP addresses, failover does not depend on DNS caches expiring, which is the key difference from Route 53 failover. It works for TCP and UDP, so it also suits non-HTTP applications such as gaming and VoIP.

The following diagram shows the path from a user to a Regional endpoint and the failover path.

How AWS Global Accelerator works. The application has two static anycast IP addresses announced from edge locations worldwide. Each user's traffic enters the AWS network at the nearest edge location and crosses the AWS backbone to an endpoint group in a Region. Health checks move traffic away from an unhealthy Region within seconds, while clients keep the same IP addresses.
The addresses and Regions are illustrative.

Traffic control

Global Accelerator sends traffic to endpoint groups, one per Region, each containing load balancers, instances or Elastic IP addresses, and several settings control how it is spread. Traffic dials set the percentage of traffic each Region's endpoint group receives, so traffic can be moved gradually to a new Region for a blue/green release or a migration, or drained from a Region before maintenance. Endpoint weights split traffic among the endpoints within one Region.

Client IP preservation passes the user's original IP address to ALB and EC2 endpoints, which matters for logging and for applications that use the address. Custom routing accelerators map each user to a specific instance and port, rather than balancing, which suits applications such as multiplayer games, where users of one session must reach the same server. The following table summarises these features.

FeatureUse
Traffic dialsPercentage of traffic per Region: blue/green, migrations, draining for maintenance
Endpoint weightsSplit within a Region
Client IP preservationALB and EC2 endpoints
Custom routing acceleratorsMap users to specific instances and ports, e.g. one game session per server
Match the pairs

Global Accelerator controls

Exam skills 3.4.1 · 2.2.2

Match each requirement with the Global Accelerator feature that meets it.

Log in to try this activity Interactive activities are free with an account.

Global Accelerator or CloudFront

Global Accelerator and CloudFront both bring users onto the AWS network at a nearby edge location, but they solve different problems. CloudFront is a content delivery network for HTTP and HTTPS: it caches content at the edge, so many requests never reach the origin, and it speeds up dynamic web requests too. It is the answer for websites, APIs and media delivery.

Global Accelerator does not cache. It gives an application two static anycast IP addresses and carries TCP and UDP traffic over the AWS backbone to the healthiest Regional endpoint, failing over between Regions within seconds rather than waiting for DNS TTLs to expire. It is the answer for non-HTTP protocols, such as gaming, IoT using MQTT and voice over IP, for clients that require fixed IP addresses, and for fast Regional failover. The following table summarises the differences.

Global Accelerator
CachingNone
ProtocolsTCP and UDP
Best forGaming, IoT (MQTT), VoIP, static IPs, fast Regional failover
CloudFront
CachingYes
ProtocolsHTTP and HTTPS
Best forStatic and dynamic web content

The following diagram compares the two services side by side.

CloudFront compared with Global Accelerator. CloudFront is a content delivery network for HTTP and HTTPS that caches at the edge, so many requests never reach the origin. Global Accelerator does not cache; it gives two static anycast IP addresses and carries TCP and UDP over the AWS backbone, failing over between Regions within seconds.
Both use the edge network; the decisive questions are whether the content can be cached and whether the protocol is HTTP.
Sort into groups

Global Accelerator or CloudFront?

Exam skills 4.4.4 · 3.4.1

Decide which service fits each workload.

Log in to try this activity Interactive activities are free with an account.
Worked example

CloudFront or Global Accelerator?

CloudFront and Global Accelerator suit different requirements. The following table identifies the appropriate service for each requirement and the reason for the choice.

RequirementChoiceWhy
Cache images and videos near usersCloudFrontContent caching
A multiplayer game over UDP needs low latency worldwideGlobal AcceleratorAny TCP or UDP; AWS network from the nearest edge
Customers' firewalls must allow-list two fixed IP addressesGlobal AcceleratorTwo static anycast IPs
Fail over between Regions in seconds without DNS cachingGlobal AcceleratorHealth checks and traffic dials, no DNS TTLs
Speed up a dynamic HTTP API worldwide with WAFCloudFrontHTTP acceleration plus edge security

The deciding clues are usually protocol (non-HTTP points to Global Accelerator), caching (points to CloudFront) and static IP addresses (Global Accelerator).

Check yourself

What does Global Accelerator give clients that a load balancer's DNS name does not?

Show answer

Two static anycast IP addresses that stay the same, and a path over the AWS global network to the nearest healthy endpoint.

Exam Tips

Remember for the exam

  • For static IP addresses that clients can allow-list for a multi-Region application, use Global Accelerator.
  • When UDP gaming traffic needs lower latency worldwide, use Global Accelerator.
  • For caching content at the edge, use CloudFront, not Global Accelerator.
  • For fast multi-Region failover with fixed IP addresses, use Global Accelerator endpoint groups.
  • To drain a Region for maintenance, lower its traffic dial to 0%.