1

I have problems with CDN and Cloud Run times to response. The response time to request is too big.

  1. CDN

  2. Cloud Run. It's problem too. Big response time http-requests and sometimes problems with static js, etc.

In the logs of the load balancer, it can be seen that the CDN (https) gives static from 2 to 20 seconds. This happens often, provided that a couple of people use the site. See screenshot 1 and screenshot 2. Response times are beyond unreasonable.

Details:

  • what's being cached: images (sizes on screenshots 1,2)
  • frontend: a load balancer with cloud cdn enabled
  • backend: a storage bucket (config)

Detailed settings:

  • Cache mode: Use origin headers (to preserve original max-age attributes of images)
  • Restricted content: Public access to the content cached by Cloud CDN allowed
  • Negative caching: Disabled
  • Serve while stale: Disabled

Frontend: https, managed certificate, premium network tier

Timur
  • 31
  • 5
  • When trying to debug a problem like this, specify an image, its properties, metadata, etc. Then create a command that accesses the file. Show the entire request and the response minus the body. Include details on how the CDN, load balancer, and bucket are configured. Otherwise, we can only guess. – John Hanley Jul 24 '21 at 18:13

1 Answers1

0

There is a known issue where requests to Cloud Run services using custom domains can have a very high latency from some locations. https://cloud.google.com/run/docs/issues#latency-domains

You can achieve greater performance with Cloud Load Balancing using a serverless NEG. https://cloud.google.com/load-balancing/docs/https/setting-up-https-serverless