大网数据广告活动
服务器运维问答

Effect of distance from server

· 52CE 我爱测

I have a web server in Ireland (Amazon AWS). This server appears fast from Germany (orange line) but slow from the USA (black line). The HTTP request used for the test is the same. I think this is normal. The distance between Ire…

问题原文

原帖链接 · ar099968 · CC BY-SA 3.0

I have a web server in Ireland (Amazon AWS). This server appears fast from Germany (orange line) but slow from the USA (black line). The HTTP request used for the test is the same.

I think this is normal. The distance between Ireland and the USA is larger than Germany to Ireland, but the difference seems too high.

Are there other possible reasons, apart from the distance to the server?

已采纳解答

原帖链接 · Peter Green · CC BY-SA 3.0

Assuming the graph is http request time it seems fairly reasonable to me.

A http request (in the absense of keepalive, fastopen etc) normally requires at least two round trips.

  • Client sends syn
  • Sever receives syn and sends syn-ack
  • Client receives syn-ack and sends ack and request.
  • Server sends response.

The speed of light in fiber is about 2*10^8 meters per second. According to google the distance from "ireland to the USA" is 6,629 km * which would translate to a round trip time of about 66 ms.

But that assumes there are no delays in equipment and that the data route follows the shortest possible path. Practical round trip times are usually 100 to 150 milliseconds between a host in Europe and a host in the USA. As such a http request time of ~250ms is perfectly normal.

What is a bit more concerning are the spikes in the graph, they suggest network congestion somewhere between the server and the test client.

* obviously it depends on what point in the USA and what point in ireland but the point google picked seemed to be somewhere in the middle of the USA and the OPs graph said "us-mid".

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2016-07-01)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。