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

Media CDN flexible origin shielding: Reducing origin load, latency, and improving viewer experience

anandpv
Staff

Anand Vijayan, Senior Product Manager
Rachel Thornton, Senior Software Engineer

Media CDN is Google Cloud's content delivery network for large-scale workloads, including video streaming and software downloads, leveraging Google's global network to provide high-performance delivery.

Origin shielding is a critical content delivery mechanism that protects your origin servers from being overwhelmed by cache-fill requests. Without it, multiple edge caches can simultaneously request the same content, leading to a 'thundering herd' problem that significantly increases origin load and egress costs.

Media CDN delivers robust origin shielding by default, a feature that sets it apart from other CDNs. It strategically deploys "long-tail caches" within Google's network, which serve as an intermediate layer. These caches consolidate requests from numerous downstream caches, sending a single, unified request to your origin. This includes a default behavior called "request collapsing," where multiple user-driven cache fill requests for the same cache key are actively combined into one origin request per edge node. This significantly reduces the direct load on your origin server and minimizes egress bandwidth needs.

Introducing flexible origin shielding (preview): While Media CDN's default origin shielding is highly effective, flexible origin shielding introduces a new level of control and flexibility. This advanced feature empowers you to explicitly configure specific shield locations closer to your origin as opposed to where end users are located. This means you can direct aggregated cache-fill traffic through a single designated shield region, regardless of where the initial user request originated. By choosing an optimal shield location, you can further:

  • Maximize Origin Offload: Reduce the need for extensive origin infrastructure by significantly decreasing the number of direct requests it receives.
  • Optimize Delivery Costs: Lower egress costs from your origin by consolidating traffic efficiently.
  • Improve Viewer Experience:  Further improve performance by reducing latency and improving cache hit ratios, leveraging Google's high-performance backbone network for even more efficient content distribution to CDN caches. This leads to even faster video start times and fewer rebuffering events.

This granular control over shield locations makes flexible origin shielding particularly beneficial for customers with centralized origins, allowing for a more tailored and efficient content delivery strategy.

Flexible origin shielding (Public Preview) is initially available in me-central1(Doha) and africa-south1 (Johannesburg).

Let’s consider an example for media content with a centralized origin, like one located in Doha, Qatar, serving a globally distributed audience, Media CDN's default origin shielding, while robust, can sometimes lead to suboptimal routing and increased latency for certain architectures. This is because the default shielding operates based on the end-user's location, not necessarily the origin's, and may route requests through long-tail caches (LTCs) that are geographically distant from the Doha origin.

Existing.png

With flexible origin shielding, you gain precise control to address this challenge, by optimizing it for your architecture. You can now explicitly select a specific Long-Tail Cache (LTC) region, such as Doha, to serve as your primary origin shield. This means that nearly all cache-fill traffic from your globally distributed users will be intelligently routed across the Google backbone and consolidated through the designated Doha LTC before reaching your origin server.

New.png

This configuration offers several significant benefits:

  • Maximize Origin Offload: By directing all cache-fill requests through a single, strategically placed LTC in Doha, you drastically reduce the direct load on your origin server. This minimizes the need for origin scaling and significantly cuts down on egress costs from your origin, as content is more efficiently served from the shield before hitting the origin.
  • Reduced Latency and Enhanced Viewer Experience: With the Doha LTC acting as the primary shield, cache-miss requests from nearby regions, particularly those in the Middle East and Africa, will experience much lower latency. Instead of potentially traversing to a distant default shield location in Europe, content is served from a cache much closer to both the origin and the local users, leading to improved video start times and reduced rebuffering rates. While users further away might route through this central shield, the overall benefits of a higher cache hit rate at the shield and reduced origin load contribute to better global performance stability.
  • Improved Cache Hit Rate and Performance Stability: By concentrating traffic to a single shield location near your origin, the Doha LTC can build a more comprehensive cache of your content. This leads to a higher cache hit rate at the shielding layer, further protecting your origin and ensuring more consistent performance across various geographical regions.

To get started with flexible origin shielding, follow the steps in our flexible shielding documentation .