PERF04-BP06 Choose your workload's location based on network requirements - Performance Efficiency Pillar

PERF04-BP06 Choose your workload's location based on network requirements

This best practice was updated with new guidance on October 3, 2023.

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, AWS Local Zones, AWS Outposts, or AWS Wavelength zones. Selection of this location influences network latency and throughput from a given user location. Edge services like Amazon CloudFront and AWS Global Accelerator can also be used to improve network performance by either caching content at edge locations or providing users with an optimal path to the workload through the AWS global network.

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. These edge locations commonly provide services like content delivery network (CDN) and domain name system (DNS). By having these services at the edge, workloads can respond with low latency to requests for content or DNS resolution. These services also provide geographic services, such as geotargeting of content (providing different content based on the end users’ location) or latency-based routing to direct end users to the nearest Region (minimum latency).

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

    Amazon CloudFront

    Use to cache static content such as images, scripts, and videos, as well as dynamic content such as API responses or web applications.

    Amazon ElastiCache

    Use to cache content for web applications.

    DynamoDB Accelerator

    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.

    Amazon CloudFront Functions

    Use for simple use cases like HTTP(s) requests or response manipulations that can be initiated by short-lived functions.

    AWS IoT Greengrass

    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.


Related best practices:

Related documents:

Related videos:

Related examples: