GA与EC2间流量

从EC2访问GA,会不会途径公网呢?答案是不会。

参考: https://repost.aws/questions/QUHhUaRUfTS3mR0AX7ubhUkg/is-traffic-between-two-ec2-public-instance-over-the-internet-or-on-aws-backbone-network

When using public IP addresses, all communication between instances and services hosted in AWS use AWS's private network. 

在EC2上可以用mtr验证这一点:

$ mtr 13.248.149.164 -nzr
Start: 2024-08-15T13:56:58+0000
HOST: ip-10-0-2-90.ec2.internal   Loss%   Snt   Last   Avg  Best  Wrst StDev
  1. AS???    10.0.1.44            0.0%    10    0.5   0.6   0.5   0.9   0.1
  2. AS14618  216.182.239.139      0.0%    10    4.6  29.2   1.7 104.3  38.5
  3. AS???    ???                 100.0    10    0.0   0.0   0.0   0.0   0.0
  4. AS???    ???                 100.0    10    0.0   0.0   0.0   0.0   0.0
  5. AS???    ???                 100.0    10    0.0   0.0   0.0   0.0   0.0
  6. AS???    ???                 100.0    10    0.0   0.0   0.0   0.0   0.0
  7. AS???    ???                 100.0    10    0.0   0.0   0.0   0.0   0.0
  8. AS???    ???                 100.0    10    0.0   0.0   0.0   0.0   0.0
  9. AS???    ???                 100.0    10    0.0   0.0   0.0   0.0   0.0
 10. AS???    ???                 100.0    10    0.0   0.0   0.0   0.0   0.0
 11. AS???    241.0.11.221         0.0%    10    0.8   0.8   0.8   0.9   0.1
 12. AS???    240.0.160.17         0.0%    10    0.8   0.9   0.8   1.1   0.1
 13. AS???    240.0.160.17         0.0%    10    0.8   0.8   0.8   1.3   0.2
        240.0.160.27
     AS???    240.0.160.27
 14. AS???    242.2.15.135         0.0%    10    2.5   5.2   1.7   8.5   2.5
        13.248.149.164
     AS16509  13.248.149.164
 15. AS16509  13.248.149.164       0.0%     9    1.3   1.3   1.2   1.3   0.0

中间几跳的100%丢包并不意味着网络有问题,可能只是这些路由器禁用了ICMP响应。

最后到达目标IP的延迟非常低(1.3ms),网络连接是正常的。

理论上来说出来EC2要到ISP,但是本身EC2 和GA 边缘站点都在一个网络内了 所以也不必经过ISP