CloudCDN + GKE

Hi,

Our team is now considering introducing CloudCDN upon GKE. Let's say we have `web.my.com` which is served by GKE with backend service `backend` through ingress named `gateway`. We'd want to set up CloudCDN with `backend`. The GKE cluster is in `asia-northeast1` region.

Now an user whose the nearest region is `asia-northeast2` does access to `web.my.com/css/foo.css`. If I'm correct, the request is firstly sent to an edge server of CloudCDN which is served in `asia-northeast2` and if the foo.css is not on the cache, a request to get the origin content would be sent.

Here I have 2 questions.

1. The global IP address for `web.my.com` is uniquely single. How is the first request sent to `asia-northeast2`? Is that done with IP any cast?

2. How are requests to the origin sent? The edge server has to have the same global IP address as the origin server. How does the edge server send request to the origin despite of having the same global IP address?

Could anyone help?
Thank you!

Solved Solved
1 4 331
1 ACCEPTED SOLUTION

CloudCDN is not located in a GCP region, but in a Google POP (point of presence), that is one of the points where Google's own network connects to the internet.
So, the logic will be (assuming you are using Global Load Balancer):

1) user requests web.my.com/css/foo.css
2) this will be caught by the POP closer to the user (where CloudCDN resides)
3) if CloudCDN at that POP has that file cached it will send it to the user, if CDN doesn't have that file, the file will be requested to the backend closest to the POP (if there were several  similar backends distributed in many regions). In your case the file will be requested to the  asia-northeast1, as its the only one you have.

You can check POP/CDN locations here:

https://cloud.google.com/cdn/docs/locations

The global load balancing anycast IP adress is listening in all POPs, its not listening in a GCP region.

https://cloud.google.com/load-balancing/docs/load-balancing-overview

 

 

View solution in original post

4 REPLIES 4

CloudCDN is not located in a GCP region, but in a Google POP (point of presence), that is one of the points where Google's own network connects to the internet.
So, the logic will be (assuming you are using Global Load Balancer):

1) user requests web.my.com/css/foo.css
2) this will be caught by the POP closer to the user (where CloudCDN resides)
3) if CloudCDN at that POP has that file cached it will send it to the user, if CDN doesn't have that file, the file will be requested to the backend closest to the POP (if there were several  similar backends distributed in many regions). In your case the file will be requested to the  asia-northeast1, as its the only one you have.

You can check POP/CDN locations here:

https://cloud.google.com/cdn/docs/locations

The global load balancing anycast IP adress is listening in all POPs, its not listening in a GCP region.

https://cloud.google.com/load-balancing/docs/load-balancing-overview

 

 

Thank you nestors,

That helps a lot!
Now my understanding is like this:
https://whimsical.com/cdn-2-english-AiFtB6ctYrybUQVbQq4zeo

 

bluage_nakayama_0-1696225872449.png

 



Is this correct?

Thanks again!

That's right: the GCP region in Osaka is not involved at all if you don't have a backend there.

Thank you!