Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Difficulty Implementing Google Cloud CDN with Custom Origin on My Website

Hello Google Cloud Community,

I hope you are all doing well. I am currently facing a challenge while trying to implement Google Cloud CDN with a custom origin on my website. I have followed the documentation and guides available, but I seem to be encountering some issues.

Here are the details of my setup:

  1. Custom Origin: I am using a custom origin server to serve the content for my website.

  2. Google Cloud CDN Configuration: I have configured Google Cloud CDN to optimize the delivery of my website's content.

Despite following the recommended steps, I am experiencing the following problems:

  • Cache Invalidation: The cache seems to be persisting even after updating content on my origin server. I've attempted cache invalidation, but it doesn't seem to reflect the changes immediately.

  • SSL Configuration: I am using SSL for my website, and I've configured the SSL certificate on both the custom origin and the CDN. However, I am encountering SSL handshake issues intermittently.

  • Header Propagation: Certain custom headers from my origin server do not seem to propagate correctly through the CDN. This is affecting some dynamic functionality on my website.

I would greatly appreciate any insights, suggestions, or solutions that the community might have regarding these issues. If you've encountered similar problems or have expertise in setting up Google Cloud CDN with a custom origin, your assistance would be invaluable.

Please tell me how to fix this as I am not a technical person 🙏  Thank you in advance for your time and support.

1 1 686
1 REPLY 1

Hi @joechorley ,

Thank you for providing these details. Let me address the issues that you've encountered with Cache Invalidation, SSL Configuration, and Header Propagation one at a time. 

Cache Invalidation:
- TTL settings are used by Cloud CDN to determine how long it should cache content. 
- Have you checked if the origin server's cache control headers are configured correctly?
You can set the Cache-Control header to control caching behavior.
- The "Cache Invalidation" option in the cloud console can be used if you need to invalidate the cache right away. Remember that it may take some time for the CDN to completely propagate cache invalidation.

SSL Configuration:
- Check the compatibility of your SSL certificate as outdated and incorrectly set SSL certificate causes intermittent SSL handshake issues. 
- Check also the cipher suites and SSL/TLS protocols that the CDN and your server support, as well as their compatibility.

Header propagation:
- Yes, Cloud CDN supports some headers, however, there are instances that it modifies or removes certain headers for security and optimization.
- If needed, you can use metadata headers to make sure specific headers pass through the CDN without changes.

I suggest you also check the logs on Logs Explorer as it may provide related error messages to cache invalidation, SSL invalidation, and even header propagation. This can be a more specific insight or analysis of the issue.

Let me know if this helps.