Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(component/network): latency checks to global edge/DERP servers (using tailscale) #125

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

gyuho
Copy link
Contributor

@gyuho gyuho commented Oct 17, 2024

/tmp/gpud scan

Check from Asia:

⌛ checking network connectivity to edge/derp servers

{"level":"info","ts":"2024-10-17T14:17:35Z","caller":"derp/derp.go:84","msg":"measuring latencies to DERP nodes"}
+-----------+---------------+--------------+
| PROVIDER  |  REGION NAME  |   LATENCY    |
+-----------+---------------+--------------+
| tailscale | Tokyo         | 135.518953ms |
| tailscale | San Francisco | 162.361141ms |
| tailscale | Seattle       | 172.660256ms |
| tailscale | Hong Kong     | 186.865222ms |
| tailscale | Los Angeles   | 192.90225ms  |
| tailscale | Denver        | 198.14393ms  |
| tailscale | Singapore     | 205.379052ms |
| tailscale | Honolulu      | 225.790173ms |
| tailscale | Toronto       | 225.854292ms |
| tailscale | London        | 228.189182ms |
| tailscale | New York City | 228.32153ms  |
| tailscale | Paris         | 229.316372ms |
| tailscale | Chicago       | 230.087345ms |
| tailscale | Dallas        | 243.016964ms |
| tailscale | Miami         | 246.843145ms |
| tailscale | Madrid        | 247.591275ms |
| tailscale | Frankfurt     | 277.455938ms |
| tailscale | Warsaw        | 291.881769ms |
| tailscale | Amsterdam     | 292.571809ms |
| tailscale | Dubai         | 330.59889ms  |
| tailscale | Bangalore     | 332.328797ms |
| tailscale | São Paulo     | 348.24734ms  |
| tailscale | Sydney        | 376.831077ms |
| tailscale | Johannesburg  | 394.437529ms |
| tailscale | Nairobi       | 427.144011ms |
+-----------+---------------+--------------+

Check from US:

⌛ checking network connectivity to edge/derp servers

{"level":"info","ts":"2024-10-17T14:18:37Z","caller":"derp/derp.go:84","msg":"measuring latencies to DERP nodes"}
+-----------+---------------+--------------+
| PROVIDER  |  REGION NAME  |   LATENCY    |
+-----------+---------------+--------------+
| tailscale | New York City | 8.998541ms   |
| tailscale | Toronto       | 19.060602ms  |
| tailscale | Chicago       | 21.435507ms  |
| tailscale | Miami         | 29.443248ms  |
| tailscale | Dallas        | 38.949296ms  |
| tailscale | Denver        | 44.731894ms  |
| tailscale | Seattle       | 62.731356ms  |
| tailscale | Los Angeles   | 64.115506ms  |
| tailscale | London        | 68.405422ms  |
| tailscale | San Francisco | 69.494831ms  |
| tailscale | Paris         | 72.688823ms  |
| tailscale | Amsterdam     | 77.882517ms  |
| tailscale | Frankfurt     | 79.832446ms  |
| tailscale | Madrid        | 87.526568ms  |
| tailscale | Warsaw        | 100.637818ms |
| tailscale | São Paulo     | 111.130095ms |
| tailscale | Honolulu      | 116.181365ms |
| tailscale | Tokyo         | 156.465546ms |
| tailscale | Dubai         | 193.692553ms |
| tailscale | Bangalore     | 209.425136ms |
| tailscale | Hong Kong     | 213.400923ms |
| tailscale | Singapore     | 224.648866ms |
| tailscale | Johannesburg  | 239.468557ms |
| tailscale | Sydney        | 259.728192ms |
| tailscale | Nairobi       | 286.71491ms  |
+-----------+---------------+--------------+

…using tailscale)

Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
@gyuho gyuho added this to the v0.0.6 milestone Oct 17, 2024
@gyuho gyuho self-assigned this Oct 17, 2024
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
@xiang90
Copy link
Contributor

xiang90 commented Oct 17, 2024

  1. do not name this derp anywhere except for imported code. we treat these are edge servers for pinging and we will add non-derp servers in the future for pinging as well.
  2. todo: map each location to a region based on aws region definitions. assign the machine with the nearest region if not explicitly specified by the user.
  3. todo: get the ASN (https://asnlookup.com/) of the machine and assign the ISP provider of the machine if not explicitly specified by the user.

Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
@gyuho
Copy link
Contributor Author

gyuho commented Oct 18, 2024

@xiang90 @cardyok Done

+----------------+------------------+---------------+----------------+--------------+
|    PROVIDER    |       ASN        |  REGION NAME  |   AWS REGION   |   LATENCY    |
+----------------+------------------+---------------+----------------+--------------+
| tailscale-derp | NETACTUATE       | Tokyo         | ap-northeast-1 | 45.730875ms  |
| tailscale-derp | NETACTUATE       | Hong Kong     | ap-east-1      | 69.628833ms  |
| tailscale-derp | NETACTUATE       | Singapore     | ap-southeast-1 | 83.550334ms  |
| tailscale-derp | NETACTUATE       | San Francisco | us-west-1      | 141.274208ms |
| tailscale-derp | NETACTUATE       | Los Angeles   | us-west-1      | 148.22575ms  |
| tailscale-derp | NETACTUATE       | Seattle       | us-west-2      | 153.131417ms |
| tailscale-derp | NETACTUATE       | Denver        | us-west-1      | 164.03975ms  |
| tailscale-derp | NETACTUATE       | Dallas        | us-west-2      | 174.929666ms |
| tailscale-derp | NETACTUATE       | Sydney        | ap-southeast-2 | 183.635083ms |
| tailscale-derp | AS-CHOOPA        | Honolulu      | us-west-2      | 187.728333ms |
| tailscale-derp | NETACTUATE       | Chicago       | us-east-2      | 190.22275ms  |
| tailscale-derp | NETACTUATE       | Toronto       | ca-central-1   | 194.690791ms |
| tailscale-derp | NETACTUATE       | New York City | us-east-1      | 199.599ms    |
| tailscale-derp | NETACTUATE       | Miami         | us-east-1      | 201.81675ms  |
| tailscale-derp | DIGITALOCEAN-ASN | Bangalore     | ap-south-1     | 229.639125ms |
| tailscale-derp | NETACTUATE       | Amsterdam     | eu-west-1      | 248.295458ms |
| tailscale-derp | NETACTUATE       | Frankfurt     | eu-central-1   | 259.755625ms |
| tailscale-derp | NETACTUATE       | London        | eu-west-2      | 269.978333ms |
| tailscale-derp | NETACTUATE       | Madrid        | eu-south-2     | 278.646ms    |
| tailscale-derp | NETACTUATE       | Paris         | eu-west-3      | 281.815208ms |
| tailscale-derp | NETACTUATE       | Dubai         | me-central-1   | 284.744417ms |
| tailscale-derp | NETACTUATE       | Warsaw        | eu-central-1   | 306.22975ms  |
| tailscale-derp | NETACTUATE       | São Paulo     | sa-east-1      | 314.844167ms |
| tailscale-derp | NETACTUATE       | Johannesburg  | af-south-1     | 425.645791ms |
+----------------+------------------+---------------+----------------+--------------+

Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
@xiang90
Copy link
Contributor

xiang90 commented Oct 18, 2024

not checking the asn of the edge server but the machine gpud is on.

Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
@gyuho
Copy link
Contributor Author

gyuho commented Oct 18, 2024

@xiang90 Got it. Will do that in a separate PR.

"Dubai": "me-central-1",
"Frankfurt": "eu-central-1",
"Hong Kong": "ap-east-1",
"Honolulu": "us-west-2",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

us-west-3??

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, AWS zone or region in Hawaii :0

Picked the one closest (Oregon).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let us call it us-west-3... it is just way to far from us-west-2

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renamed to us-west-3, and region code, since it's not 1:1 mapped to AWS regions any more. Please let me know if you have any other feedback.

"Amsterdam": "eu-west-1",
"Bangalore": "ap-south-1",
"Chicago": "us-east-2",
"Dallas": "us-west-2",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can enable the new Local Zone in Dallas, us-east-1-dfw-2a, from the Zones tab

https://aws.amazon.com/about-aws/whats-new/2023/11/aws-new-local-zone-dallas-texas/

So, should be us-east-1, closest AWS "region"

Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
Copy link
Contributor

@cardyok cardyok left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm and tested works fine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants