Google Cloud accessing API behind Cloudflare

#1

I created a VM instance at East-4 (Ashburn, Northern Virginia, USA) calling APIs.
When I tried:

curl -s https://www.cloudflare.com/cdn-cgi/trace, it shows

fl=27f53
h=www.cloudflare.com
ip=35.236..
ts=1557063064.615
visit_scheme=https
uag=curl/7.63.0
colo=ATL
http=http/1.1
loc=US
tls=TLSv1.3
sni=plaintext
warp=off

shows that I am using ATL, instead of IAD.
How could I resolve this?

#2

You would have to contact your ISP. They determine routing to Cloudflare networks.

2 Likes
#3

What is the ping? GCloud peers with CF, so ping is probably <5ms (even to ATL).

1 Like
#4

Just spun my own instance and the ping is ~15ms, not great compared to Akamai:

$ ping cloudtest.chmonyweb.com.edgesuite.net
PING a1145.q.akamai.net (204.237.142.210) 56(84) bytes of data.
64 bytes from 204.237.142.210 (204.237.142.210): icmp_seq=1 ttl=56 time=1.11 ms
64 bytes from 204.237.142.210 (204.237.142.210): icmp_seq=2 ttl=56 time=0.774 ms

$ ping cloudflare.com
PING cloudflare.com (198.41.214.162) 56(84) bytes of data.
64 bytes from 198.41.214.162: icmp_seq=1 ttl=53 time=15.5 ms
64 bytes from 198.41.214.162: icmp_seq=2 ttl=53 time=14.9 ms

See the list of DCs on here:

It might not be peered, or the routing to ATL is backfiring.

#5

I am getting real-time data and from the site, and connecting to IAD would minimize the latency between the data source and cloudflare as well(Stated by the data provider).

#6

@cheelongchow See the following article for how CF chooses datacenters (or rather, how they can’t directly affect how ‘fast’ or optimized routing is without peering)

This is an issue with the routes between CF and Google, and there’s not much that Cloudflare can do to improve this. 15ms is a reasonable amount of latency for non-peered connections.

#7

It should be interconnected/peered at Ashburn, US, which is IAD I believe.

According to https://www.cloudflare.com/integrations/google-cloud/