5

I see no way to connect my app engine backends with Cloud CDN. Seems like it's only available when using Compute Engine directly.

Cesar Varela
  • 5,004
  • 2
  • 16
  • 17

2 Answers2

4

No, that is not currently possible. Currently, Google Cloud CDN can be used only to serve content that originates from Cloud Storage buckets, Compute Engine instance groups, and Compute Engine network endpoint groups. I agree that it would make sense to support App Engine Standard, too!

elving
  • 1,441
  • 8
  • 7
2

Update

Currently in beta is Serverless NEGs (Network Endpoint Groups) which will allow you to use App Engine behind a HTTP(S) Load balancer and give you all the features provided with that including CDN

Original

Yes, App Engine will serve content via Google Cloud CDN as long as a cacheable response is returned.

Try setting the Cache-Control header to something like max-age=86400, public and ensuring a Set-Cookie header is not sent with the response

Craig
  • 129
  • 4
  • Hi @Craig are you sure, do you have any documentation that proves this? – dendog Jan 12 '20 at 18:35
  • @dendog I have not seen any documentation stating this, I actually came across this when trying to debug why a file wasn't changing. – Craig Jan 13 '20 at 20:10
  • @Hoff It was not in the browser cache, I could see the requests to app engine in stackdriver logging with an instance id of -1 – Craig Jan 28 '20 at 20:08
  • @Craig how do you configure the CDN to serve App Engine app? – MeLight May 19 '20 at 12:20
  • @MeLight Your application needs to send a cacheable response via the Cache-Control header – Craig May 20 '20 at 17:15
  • @craig any advice on what to search for the make this configuration? Would love the help. – franciscojavierarceo Jul 24 '20 at 14:30
  • @franciscojavierarceo There isn't really any documentation available for my original answer. But with the introduction of Serverless NEGs you should have a better supported way of using the CDN in App Engine – Craig Jul 28 '20 at 12:14