How to detect the location of an anycast server?

1,029 views
Skip to first unread message

Johnson Li

unread,
Jan 20, 2018, 4:52:15 PM1/20/18
to gce-discussion
Hi guys, 

Google is using anycast in its Cloud DNS and Cloud CDN service, and the servers are deployed across all of its data centers. I am wondering whether it is possible to find out the datacenter that my request is sending to? 

Thank you.

Navi Aujla (Google Cloud Support)

unread,
Jan 20, 2018, 6:04:42 PM1/20/18
to gce-discussion
Hello Johnson, 

You may want to check this thread[1], answered by one of our engineers. In brief, the hops internal to the Google usually do not hint any geographical location. 

[1] https://stackoverflow.com/questions/41988170/why-do-google-cloud-platform-static-ip-addresses-list-mountain-view-ca-in-rever

Johnson Li

unread,
Jan 21, 2018, 11:50:29 AM1/21/18
to gce-discussion
Hi Navi,

Thank you for your answer. But I am not trying to associate an IP address to a geolocation. What I care about is which server from Google responses to my request.
For example, I have set up a CDN service to cache my bucket storage files. It gives me an address a.b.c.d:80 indicating the address of the CDN server. Then whenever I make an HTTP request to http://a.b.c.d/file_name, the CDN server is able to give me a quick response because Google has a globally scaled CDN points (https://cloud.google.com/about/locations/#network-tab). So my question is that may I know which CDN point receives my request?

Navi Aujla (Google Cloud Support)

unread,
Jan 21, 2018, 5:37:20 PM1/21/18
to gce-discussion
Hello Johnson, 

For the CDN, refer to this documentation for the cache locations. Let me check if its possible to get the POP information for the CDN server.

[1] https://cloud.google.com/cdn/docs/locations

Navi Aujla (Google Cloud Support)

unread,
Jan 22, 2018, 4:59:45 PM1/22/18
to gce-discussion
Hello Johnson

How are you using CDN (eg: with HTTP LB)? If so, What is the IP and Is it the LB IP you mentioned in your last response?

In general, when Cloud CDN is used with a backend service or backend bucket for a Global HTTP Load Balancer, cache fills happen only for endpoints nearest the clients that make the requests. Fills are not propagated to other Cloud CDN endpoints. Cloud CDN endpoint nearest the user in terms of network hops or lower latency,  serves the user's request. If the request has already been cached (that is, another nearby client has already made the same request and a cache fill has happened). For more information, refer to this documentation[1]. 

Moreover, is there any specific reason to know the geolocation of the IP associated with CDN server?

[1] https://cloud.google.com/cdn/docs/overview#fill-and-egress

Johnson Li

unread,
Jan 22, 2018, 6:07:08 PM1/22/18
to gce-discussion
Hi Navi,

Yes, I am using CDN with HTTP LB and the IP that I mentioned is the LB IP. Thank you for your explanation, that is exactly what CDN does. 

As we know, Google uses anycast to scale CDN servers globally (https://cloud.google.com/cdn/). I want to find out if anycast is able to achieve the minimum latency. For example, a user makes a request (to a CDN server) from Canada. The request is supposed to arrive at one of the Google's datacenters, maybe Oregon. The choice of destination is made by anycast (or BGP exactly). But this rule does not guarantee a minimal latency. Perhaps the latency is much smaller if the request is sent to the datacenter in Montreal. 

So if I know which datacenter my request comes to, I can send more requests to the other datacenters manually and find out if the choice that anycast provides is optimal. I hope I have presented the reason clearly.

Navi Aujla (Google Cloud Support)

unread,
Jan 25, 2018, 10:13:00 AM1/25/18
to gce-dis...@googlegroups.com
Hello Johnson, 

We do not give out IP addresses for the CDN endpoints themselves. I would suggest you to check the documentation on how Cloud CDN content delivery network works with HTTP(S) load balancing. In addition, check this brief documentation on how HTTP(S) Load Balancing works. Overall, to reduce the latency, caching is served by the CDN servers closer to the user. For the best practices on the content delivery, refer to this documentation link

I would highly suggest you to check this article and video link(included)  "How good is Google Cloud’s CDN?" which provides more insight on Google Cloud CDN performance. 

Johnson Li

unread,
Jan 25, 2018, 10:44:26 AM1/25/18
to gce-discussion
Hi Navi,

Thank you very much for your help.


On Thursday, January 25, 2018 at 5:13:00 PM UTC+2, Navi Aujla (Google Cloud Support) wrote:
Hello Johnson, 

We do not give out IP addresses for the CDN endpoints themselves. I would suggest you to check the documentation on how Cloud CDN content delivery network works with HTTP(S) load balancing. In addition, check this brief documentation on how HTTP(S) Load Balancing works. Overall, to reduce the latency, caching is served by the CDN servers closer to the user. 

Reply all
Reply to author
Forward
0 new messages