Source URL: https://cloud.google.com/blog/products/networking/run-service-extensions-plugins-with-cloud-cdn/
Source: Cloud Blog
Title: Run your own code at the edge with Service Extensions plugins for Cloud CDN
Feedly Summary: At Google Cloud, we’re committed to delivering the best performance possible globally for web and API content. Cloud CDN is a high-performance edge caching solution that runs at over 200 points of presence, and we continue to add more features and capabilities to it. Recently we launched invalidation with cache tags, device characterization, 0-RTT early data, and geo-targeting. These powerful first class features address many use cases, but organizations tell us they also need a more flexible, lightweight, edge computing solution.
We are excited to announce that you can now run Service Extensions plugins with Cloud CDN, allowing you to run your own custom code directly in the request path in a fully managed Google environment with optimal latency. This allows you to customize the behavior of Cloud CDN and the Application Load Balancer to meet your business requirements.
Service Extensions plugins with Cloud CDN supports the following use cases:
Custom traffic steering: Manipulate request headers to influence backend service selection.
Cache optimization: Influence which content is served from a Cloud CDN cache.
Exception handling: Redirect clients to a custom error page for certain response classes.
Custom logging: Log user-defined headers or custom data into Cloud Logging.
Header addition: Create new headers relevant for your applications or specific customers.
Header manipulation: Rewrite existing request headers or override client headers on their way to the backend.
Security: Write custom security policies based on client requests and make enforcement decisions within your plugin.
aside_block
Where you can run your code
Service Extensions plugins run at multiple locations in the request and response processing path. With this launch, you can run plugins before requests to Cloud CDN using an edge extension. In a previous launch, we added the capability to run plugins post the Cloud CDN cache, closer to the origin, via a traffic extension. Now, with support for both edge and traffic extensions, you can choose where you want your code to execute in the processing path.
Service Extensions deep dive
Service Extensions plugins are designed for lightweight compute operations that run as part of the Application Load Balancer request path. Plugins are built on WebAssembly (Wasm), which provides several benefits:
Near-native execution speed, and startup time in the single milliseconds
Support for a variety of programming languages, such as Rust, C++, and recently Go
Cross-platform portability, so you can run the same plugin in various deployments, or locally for testing
Security protections, such as executing plugin logic in a sandboxed environment
Service Extensions plugins leverage Proxy-Wasm, a Google-supported open source project that provides a standard API for Wasm modules to interface with network proxies.
Use Cloudinary’s image & video optimization solution
We are excited to announce our latest partner to integrate their offering with Service Extensions and Cloud CDN. Cloudinary makes an advanced image and video optimization solution and has integrated it with Service Extensions plugins for deployment to Cloud CDN customers.
Packaged as a Wasm plugin, Cloudinary’s plugin takes directives from Client Requests such as User-Agent information, and content type expressed as MIME types from HTTP Accept headers, to determine the most optimal media type to serve to the end user. The plugin also takes care of Cache Key normalization so that the images and videos are cached properly based on device types and content types.
“Cloudinary’s image and video solutions help customers manage and optimize their visual media assets at scale while ensuring they are optimized for the best format, device, channel and viewing context. We are excited to partner with the Google team to offer Cloudinary’s image and video optimization solutions to Cloud CDN customers via Service Extensions.” – Gary Ballabio, VP, Strategic Technology Partnerships, Cloudinary
For more information on Cloudinary’s solution, please review this guide.
What’s next
To get started with Service Extensions plugins, take a look at our growing samples repository with a local testing toolkit and follow our quickstart guide in the documentation.
AI Summary and Description: Yes
Summary: The announcement from Google Cloud highlights new features in Cloud CDN, specifically the introduction of Service Extensions plugins that allow users to run custom code directly in the request path. This capability brings significant flexibility and optimization to edge computing tasks, including enhanced traffic control and security policies, which can be particularly valuable for organizations seeking tailored performance and compliance solutions.
Detailed Description:
Google Cloud has recently enhanced its Cloud CDN (Content Delivery Network) offerings with the introduction of Service Extensions plugins, aimed at providing organizations with a flexible and powerful edge computing solution. Below are key insights and features related to this announcement:
– **High-Performance Caching**: Cloud CDN operates globally through over 200 presence points and is focused on optimizing web and API content delivery.
– **New Features Released**:
– Invalidation with cache tags
– Device characterization
– 0-RTT early data
– Geo-targeting
– **Service Extensions**:
– These plugins allow for the execution of custom code in the request processing path in a fully managed environment with optimal latency.
– Enhanced flexibility for organizations in how they manage their content delivery, allowing for tailored solutions based on specific business needs.
– **Support for Various Use Cases**:
– **Custom Traffic Steering**: Adjust request headers to impact which backend services are utilized.
– **Cache Optimization**: Dictate what content is served from the CDN cache for better user experiences.
– **Exception Handling**: Direct users to custom error pages based on specific responses.
– **Custom Logging**: Implement logging for user-defined headers or data.
– **Header Manipulation**: Create or alter headers relevant to applications or users, enhancing interaction and security.
– **Security**: Craft custom security policies based on client requests, allowing for dynamic enforcement within plugins.
– **Technical Basis**:
– Service Extensions are built on WebAssembly (Wasm), providing advantages such as:
– Near-native execution speed
– Support for multiple programming languages (e.g., Rust, C++, Go)
– Cross-platform compatibility
– Enhanced security through sandboxed execution
– **Partnership with Cloudinary**:
– Integration of Cloudinary’s image and video optimization solutions with Service Extensions, facilitating improved media management and caching based on device and content types.
– **Next Steps for Users**:
– Users interested in implementing Service Extensions plugins can access resources such as a growing samples repository and a quickstart guide.
This innovation in Cloud CDN significantly enhances the capabilities of organizations to tailor their content delivery solutions while also addressing critical areas of performance, security, and compliance. The flexibility offered through Service Extensions plugins makes them a valuable toolkit for IT and security professionals looking to optimize their infrastructures.