Score:-3

Why is ping from New Jersey faster than from Tokyo to binance (in Tokyo)?

pn flag

I am thinking of using vultr as VPS. When I do a ping to binance api.binance.com which have their servers in Japan on the site https://hnd-jp-ping.vultr.com I get much worse ping from Japan than if I choose to ping from New Jersey. Why do I get better ping from New Jersey to binance api than from Japan when binance is located in japan?

Tokyo

$ping -c 4 -w15 api.binance.com
PING d3h36i1mno13q3.cloudfront.net (108.138.105.100) 56(84) bytes of data.
64 bytes from server-108-138-105-100.jfk50.r.cloudfront.net (108.138.105.100): icmp_seq=1 ttl=245 time=176 ms
64 bytes from server-108-138-105-100.jfk50.r.cloudfront.net (108.138.105.100): icmp_seq=2 ttl=245 time=176 ms
64 bytes from server-108-138-105-100.jfk50.r.cloudfront.net (108.138.105.100): icmp_seq=3 ttl=245 time=176 ms
64 bytes from server-108-138-105-100.jfk50.r.cloudfront.net (108.138.105.100): icmp_seq=4 ttl=245 time=176 ms

--- d3h36i1mno13q3.cloudfront.net ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3000ms
rtt min/avg/max/mdev = 176.356/176.418/176.450/0.037 ms

New Jersey

$ping -c 4 -w15 api.binance.com
PING d3h36i1mno13q3.cloudfront.net (18.165.100.49) 56(84) bytes of data.
64 bytes from server-18-165-100-49.iad55.r.cloudfront.net (18.165.100.49): icmp_seq=1 ttl=247 time=8.10 ms
64 bytes from server-18-165-100-49.iad55.r.cloudfront.net (18.165.100.49): icmp_seq=2 ttl=247 time=8.13 ms
64 bytes from server-18-165-100-49.iad55.r.cloudfront.net (18.165.100.49): icmp_seq=3 ttl=247 time=8.13 ms
64 bytes from server-18-165-100-49.iad55.r.cloudfront.net (18.165.100.49): icmp_seq=4 ttl=247 time=8.16 ms

--- d3h36i1mno13q3.cloudfront.net ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3003ms
rtt min/avg/max/mdev = 8.096/8.127/8.155/0.021 ms
Score:1
ar flag

Why do I get better ping from New Jersey to binance api than from Japan when binance is located in japan

What makes you think so?

It's pretty evident from the returns you see that you're reaching a CDN (cloudfront.net). The CDN's job is to ensure that things are cached and/or hosted close to the clients. It's also evident from the IP's listed that you're talking to two different CDN nodes.

In short: you can't infer where their services are located, and you can't infer the latency of an API using ping.

dave_thompson_085 avatar
jp flag
In general you can't be certain, but in this case it appears CF is using IATA codes in their RDNS names: 'jfk' is New York City (very far from Tokyo) and 'iad' is Washington DC (just a hop, skip, and jump from New Jersey).
vidarlo avatar
ar flag
@dave_thompson_085 Agree, resolves to OSL for me, which matches your theory.
Xtreme avatar
pn flag
ok, so "in the real world" (you can't infer the latency of an API using ping) is it better to choose the server located in Tokyo anyway?
vidarlo avatar
ar flag
I don't think you have enough information to conclude.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.