Multiple origin buckets for Cloud CDN as fallback

I have two buckets that I want to serve from the same CDN URL.  I want a feature like CloudFront Origin Group, where if an object is not found in one bucket, it will be fetched from another bucket in the origin group.  Is there any similar feature for the cloud front as well?

3 1 259
1 REPLY 1

Hi @rajpra ,

Your question is not clear if you are trying to ask for help with Amazon's CloudFront or if you are asking for the equivalent feature in Cloud CDN.

I can provide answers with Cloud CDN but if you have further questions with Amazon's CloudFront, it would be best to go to their support page.


@rajpra wrote:

Is there any similar feature for the cloud front as well?



Google Cloud CDN doesn't support handling multiple Cloud Storage buckets like CloudFront's Origin Groups. But you can make it work by combining Google Cloud Storage with Google Cloud Load Balancing. By using load balancing with several backend buckets, you create a backup system. The CDN, via the load balancer, will attempt to get content from one bucket. If it's not there, it will switch to another. Below are the steps:

1. First, you need to create multiple GCS buckets, each will be a backend for your content.
2. Then, create a backend service in Load Balancing. Add your GCS buckets as backend buckets to the backend service
3. Set up the load balancing rules to specify the order or conditions for getting content from various backend buckets.
4. Enable Google Cloud CDN for your load balancer.

  1.  

You can refer to these documentation below for more details:
a. https://cloud.google.com/cdn/docs/setting-up-cdn-with-mig
b. https://cloud.google.com/cdn/docs/using-cdn#:~:text=Cloud%20CDN%20works%20with%20the,that%20respond%....