[ Web Proxy ]
URL:
Viewing: https://docs.cloud.google.com/service-extensions/docs/plugins-overview [Back]  [Original]

Plugins overview  |  Service Extensions  |  Google Cloud Documentation Skip to main content
Google Cloud Documentation [Google Cloud Documentation]
Send feedback

Plugins overview Stay organized with collections Save and categorize content based on your preferences.

This page provides overview information about the integration of plugins with Cloud Load Balancing Application Load Balancers and Media CDN.

This feature is in Preview for Media CDN.

Plugins are built using WebAssembly (Wasm) format and use Proxy-Wasm APIs.

How plugins work

You can use Service Extensions with Application Load Balancers and Media CDN as follows:

  1. Prepare plugin code as follows:

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

    2. Compile your code into a Wasm module.

    3. Upload your compiled plugin code to an Artifact Registry repository.

  2. Create a plugin that contains the uploaded plugin code.

  3. Configure the plugin in Cloud Load Balancing extensions or Media CDN extensions.

Plugin resources

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

Access attributes in plugins

Wasm plugins can access forwarded attributes by using the proxy_get_property ABI call, which is part of the Proxy-Wasm ABI. The property name that you can retrieve corresponds to the attribute name.

You can access properties as a path representation of the attribute name. For example, to retrieve request.host, you can use a path representation such as {"request", "host"}.

The following conceptual Rust example demonstrates how to access forwarded attributes within an HttpContext implementation:

use proxy_wasm::traits::{HttpContext, RootContext};
use proxy_wasm::types::Action;

// ... inside your HttpContext implementation ...

fn on_request_headers(&mut self, _num_headers: usize, _end_of_stream: bool) -> Action {
    if let Some(host) = self.get_property(vec!["request", "host"]) {
        // host is a Vec, convert to string
        let host_str = String::from_utf8(host).unwrap_or_default();
        log::info!("Request host: {}", host_str);
    }

    if let Some(region) = self.get_property(vec!["source", "client_region"]) {
        let region_str = String::from_utf8(region).unwrap_or_default();
        log::info!("Client region: {}", region_str);
    }

    Action::Continue
}

Limitations

This section lists some limitations with plugins.

Limitations on resources

Plugins are strictly constrained in how many resources they can use:

Use the plugin tester to benchmark a plugin's CPU and memory characteristics.

Limitations on APIs

Limitations with header manipulation

Limitations with HTTP/1.1 clients and backends

When you configure either REQUEST_BODY or RESPONSE_BODY for an extension, if the load balancer receives a matching request, it removes the Content-Length header from the response and switches to chunked body encoding.

What's next

Send feedback

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2026-08-11 UTC.

Need to tell us more? [[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026-08-11 UTC."],[],[]]

Web Proxy Viewer  |  New URL  |  Original Page