Media CDN extensions overview

This page provides overview information about the integration of Service Extensions plugins with Media CDN.

Service Extensions plugins are built using WebAssembly (Wasm) format and leverage Proxy-Wasm APIs.

  • Wasm is an open and standardized binary instruction format that enables a host to load and run Wasm modules with customer-provided code. Wasm has a number of benefits for executing customer code, including sandboxing for security, support for multiple languages, portability, broad and growing support within the industry, and improved performance relative to other VM-based options such as JavaScript.

  • Proxy-Wasm is an open source project started by Google. It defines APIs that let you customize the behavior of network proxies by implementing callbacks to be executed during HTTP request and response processing.

How Service Extensions plugins work

You can use Service Extensions with Media CDN as follows:

  1. Create custom code by using one of the Proxy-Wasm SDKs:

  2. Compile your code into a Wasm module.

  3. Build a Docker container image that contains your Wasm module.

  4. Publish your container image to an Artifact Registry repository. Specify image tags or digests, as required.

  5. Create a plugin that contains the uploaded Wasm module.

  6. Configure your Media CDN service to use the required host rules and route rules, and link the plugin to it.

In the Media CDN processing path, Wasm plugins are run after route matching and security but before caching policy.

Service Extensions plugin resources

Service Extensions helps you create the following key resources that help you add custom code in the Media CDN processing path:

  • Plugins, which contain the custom code that you want to deploy while running Media CDN.

  • Wasm actions, which are the attachment resources that connect Media CDN to plugins.

  • Plugin versions, which are versions of a container image. You can indicate a version as the main (active) version.

Request access

To request access to Service Extensions, contact your Google Cloud sales representative or your account team.

When you have access, prepare your plugin code and start creating Service Extensions plugins.

What's next