How to monitor the network latency between different AWS regions?

How to monitor the network latency between different AWS regions?

In this article, I will show you how we can monitor the network latency between AWS regions.

Background

Global Infrastructure - AWS

AWS has 36 launched regions as I am writing this article. When you deploy your application across regions, you may need to consider the network latency, which can affect network performance.

Problem

Originally, if we needed to check the latency between regions, we would typically create EC2 instances in each region and have them ping each other. However, what if we need to monitor long-term latency? How do we set an alarm when the latency between specific regions increases?

Recommendations

You can use the AWS Network Manager to check the real-time performance for the AWS Global Network. The AWS Network introduced real-time performance monitoring on 2022/11/28.

AWS Network Manager introduces real-time performance monitoring for the AWS Global Network

With that service, we can subscribe to data about specific regions that we want to monitor.
Here are some simple steps. Search for the Network Manager in the search bar and click to access the service. In the left menu, you will see Infrastructure Performance.

AWS Network Manager menu

In the Infrastructure Performance section, you can filter the source and destination and tick the data you’re interested in. After ticking the data, click Manage CloudWatch Subscriptions.

Select the interested data

In the subscription settings, select all data and click Update Subscriptions to change to Subscribe and confirm.

Confirm to subscribe the data

After you subscribe to the data, you can start to see the data in Network Manager.

The example for Network Latency

The default period will be 5 mins. Let’s check the time range from 2024–08–24 05:00–06:00 UTC. In the previous snapshot, you can see there is a spike regarding the latency between ap-northeast-1 and us-east-1 at 2024–08–24 05:15 UTC. You can also tick multiple data points you want to check and show in the same diagram.

You can also check the metrics in AWS CloudWatch and set the related alarms. For example, if your application has connections across ap-northeast-1 and eu-central-1, you can check the normal latency and set the related alarms in CloudWatch. Here, you need to notice that the data you can find in CloudWatch is available only after you start subscribing to the related data.

References

What is Infrastructure Performance for AWS Network Manager? - AWS Network Manager
Infrastructure Performance allows you to obtain near real-time and historical network latency across AWS Regions and across or within Availability Zones for a specified time period
Monitoring AWS Global Network Performance | Amazon Web Services
As an AWS customer, you might often want to understand the performance of the AWS Global Network. Visibility into how the AWS Global Network is performing at any given time can help you plan expansions into new AWS Regions and Availability Zones (AZs), as well as streamline troubleshooting of performance-related incidents. Today, I’m happy to […]