Network latency inside AWS region

0

Hello,

I would like to ask for an advice about network latency inside an AWS region.

I have an EC2 instance that communicates with a Server that is hosted in the same AWS region. The Server is not owned by me, so I have only basic public information about it like domain name and IP address.

My goal is to achieve the lowest possible network latency between my EC2 instance and the Server. Simply placing the EC2 instance in the same region results in a latency of GET request around 20ms, but I believe this can be still improved somehow.

Are you able to give some insight please?

asked 2 years ago431 views
1 Answer
0
Accepted Answer

If we were only looking at network latency, 20 milliseconds is somewhere between 2,000 and 6,000 kilometres - that's a long way. But there are many other causes for latency. When you do a GET request there are (probably) load balancers, database requests, WAF rules, remote host CPU load - all sorts of things that are happening and many of them are going to be completely out of your control.

If you're sure that the remote server is in the same region I'd recommend trying different availability zones - it may make a difference (it also may not).

As a motherhood statement: Building an application around the lowest possible latency that is available means that it will fail or behave in unexpected ways when (not if!) the latency increases in the future due to some issue that (as above) is out of your control. Best to plan for higher latency than you're seeing. I understand that there are plenty of applications that depend on very low latency so finding the right combination of things to make that happen is important but there are laws of physics that can't be beaten.

profile pictureAWS
EXPERT
answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions