PERF04-BP06 Choose your workload's location based on network requirements
Evaluate options for resource placement to reduce network latency and improve throughput, providing an optimal user experience by reducing page load and data transfer times.
Common anti-patterns:
-
You consolidate all workload resources into one geographic location.
-
You chose the closest Region to your location but not to the workload end user.
Benefits of establishing this best practice: User experience is greatly affected by the latency between the user and your application. By using appropriate AWS Regions and the AWS private global network, you can reduce latency and deliver a better experience to remote users.
Level of risk exposed if this best practice is not established: Medium
Implementation guidance
Resources, such as Amazon EC2 instances, are placed into Availability Zones within AWS Regions
Amazon EC2 provides placement groups for networking. A placement group is a logical grouping of instances to decrease latency. Using placement groups with supported instance types and an Elastic Network Adapter (ENA) enables workloads to participate in a low-latency, reduced jitter 25 Gbps network. Placement groups are recommended for workloads that benefit from low network latency, high network throughput, or both.
Latency-sensitive services are delivered at edge locations using AWS global network, such as Amazon CloudFront
Use edge services to reduce latency and to enable content caching. Configure cache control correctly for both DNS and HTTP/HTTPS to gain the most benefit from these approaches.
Implementation steps
-
Capture information about the IP traffic going to and from network interfaces.
-
Analyze network access patterns in your workload to identify how users use your application.
-
Use monitoring tools, such as Amazon CloudWatch
and AWS CloudTrail , to gather data on network activities. -
Analyze the data to identify the network access pattern.
-
-
Select Regions for your workload deployment based on the following key elements:
-
Where your data is located: For data-heavy applications (such as big data and machine learning), application code should run as close to the data as possible.
-
Where your users are located: For user-facing applications, choose a Region (or Regions) close to your workload’s users.
-
Other constraints: Consider constraints such as cost and compliance as explained in What to Consider when Selecting a Region for your Workloads.
-
-
Use AWS Local Zones
to run workloads like video rendering. Local Zones allow you to benefit from having compute and storage resources closer to end users. -
Use AWS Outposts
for workloads that need to remain on-premises and where you want that workload to run seamlessly with the rest of your other workloads in AWS. -
Applications like high-resolution live video streaming, high-fidelity audio, and augmented reality or virtual reality (AR/VR) require ultra-low-latency for 5G devices. For such applications, consider AWS Wavelength
. AWS Wavelength embeds AWS compute and storage services within 5G networks, providing mobile edge computing infrastructure for developing, deploying, and scaling ultra-low-latency applications. -
Use local caching or AWS Caching Solutions
for frequently used assets to improve performance, reduce data movement, and lower environmental impact. Service When to use Use to cache static content such as images, scripts, and videos, as well as dynamic content such as API responses or web applications.
Use to cache content for web applications.
Use to add in-memory acceleration to your DynamoDB tables.
-
Use services that can help you run code closer to users of your workload like the following:
Service When to use Use for compute-heavy operations that are initiated when objects are not in the cache.
Use for simple use cases like HTTP(s) requests or response manipulations that can be initiated by short-lived functions.
Use to run local compute, messaging, and data caching for connected devices.
-
Some applications require fixed entry points or higher performance by reducing first byte latency and jitter, and increasing throughput. These applications can benefit from networking services that provide static anycast IP addresses and TCP termination at edge locations. AWS Global Accelerator
can improve performance for your applications by up to 60% and provide quick failover for multi-region architectures. AWS Global Accelerator provides you with static anycast IP addresses that serve as a fixed entry point for your applications hosted in one or more AWS Regions. These IP addresses permit traffic to ingress onto the AWS global network as close to your users as possible. AWS Global Accelerator reduces the initial connection setup time by establishing a TCP connection between the client and the AWS edge location closest to the client. Review the use of AWS Global Accelerator to improve the performance of your TCP/UDP workloads and provide quick failover for multi-Region architectures.
Resources
Related best practices:
-
COST08-BP03 Implement services to reduce data transfer costs
-
REL10-BP02 Select the appropriate locations for your multi-location deployment
-
SUS01-BP01 Choose Region based on both business requirements and sustainability goals
-
SUS02-BP04 Optimize geographic placement of workloads based on their networking requirements
Related documents:
Related videos:
-
AWS re:Invent 2023 - A migration strategy for edge and on-premises workloads
-
AWS re:Invent 2021 - AWS Outposts: Bringing the AWS experience on premises
-
AWS re:Invent 2020: AWS Wavelength: Run apps with ultra-low latency at 5G edge
-
AWS re:Invent 2022 - AWS Local Zones: Building applications for a distributed edge
-
AWS re:Invent 2021 - Building low-latency websites with Amazon CloudFront
-
AWS re:Invent 2022 - Improve performance and availability with AWS Global Accelerator
-
AWS re:Invent 2022 - Build your global wide area network using AWS
-
AWS re:Invent 2020: Global traffic management with Amazon Route 53
Related examples: