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.
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:
Create custom code by using one of the Proxy-Wasm SDKs:
Compile your code into a Wasm module.
Build a Docker container image that contains your Wasm module.
Publish your container image to an Artifact Registry repository. Specify image tags or digests, as required.
Create a plugin that contains the uploaded Wasm module.
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.
To request access to Service Extensions, contact your Google Cloud sales representative or your account team.