HectorJ
HectorJ

Reputation: 6324

How to put a Google Cloud Run service behind Cloud CDN?

I want to put a CDN in front of a Google Cloud Run service in order to cache some responses.

Right now it seems Cloud CDN requires a Google Load Balancer, and they cannot point to a Google Cloud Run service (https://github.com/ahmetb/cloud-run-faq/tree/e7a0fc43d3054456613c09e073db289ddf76dd33#how-can-i-configure-cdn-for-cloud-run-services).

Is there another way?

Upvotes: 2

Views: 3990

Answers (2)

jimmont
jimmont

Reputation: 2544

Additionally it's possible without using the Load Balancer by serving it through a Firebase app by adding a Cache-Control header and via a rewrite rule in firebase.json (via the unofficial Cloud Run FAQ).

Upvotes: 1

Steren
Steren

Reputation: 7909

[updated]

You can use Cloud CDN with Cloud Run via Google Cloud Load Balancer

Upvotes: 4

Related Questions