Introducing the WebAssembly Hub, a service for building, deploying, sharing, and discovering Wasm extensions for Envoy Proxy
Extending the Envoy Proxy
One of the major strengths of the Envoy Proxy is that it can be extended in many ways, through filters, tracers, health checkers, monitors, and more. Since the microservices environment is highly dynamic and rapidly changing, this extensibility allows Envoy to swiftly adapt and adjust.
The main way to add functionality to Envoy and to modify its behavior is to introduce new filters. Envoy is written in C++, so the most natural way to extend it is in C++. The code is then integrated into Envoy, so adding a new extension means compiling it into Envoy, thus moving away from the base distro.
The next step in the evolution of Envoy involves simplifying the process of developing extensions and loading them to the proxy at runtime. This is why we’re excited about WebAssembly.
WebAssembly enhances the ability to extend Envoy
WebAssembly (Wasm) is a fast, efficient, portable binary instruction format, providing an embeddable and safe execution environment for platform extensions. Wasm is a popular way to extend web based applications, where it provides security (by running in a sandbox), speed (running 50–70% as fast as native C++), and portability.
Integrating WebAssembly will crank up our ability to extend Envoy:
- With Wasm, we can dynamically add or modify extensions by moving code into a running Envoy process, with no need to stop or recompile.
- Wasm extensions do not make direct changes to Envoy itself, so we can always work with the standard codebase.
- The active Wasm community has already developed compiler support for popular languages, including C/C++, Rust, Go and more.
- Wasm provides isolation because the extensions are separate from Envoy itself. Therefore, if/when an extension crashes, it will not take down Envoy with it.
Gloo, our API gateway, supports WebAssembly out of the box
Last month we announced version 1.0 of Gloo, our Envoy Proxy-based API gateway, and one of its more innovative features is built-in support for WebAssembly. With this feature, users can build and deploy Wasm extensions both to Envoy and Gloo. You can see here a demo showing how to modify the behaviors of Envoy and Gloo by loading a Wasm module.
Announcing Web Assembly Hub
At Solo.io, we believe that extending the functionality of your service mesh should be simple and secure. Last month we introduced Autopilot, an open-source operator framework for building workflows on top of a service mesh, which makes it easy to extend its control plane.
To also simplify the extension of the data plane, we aim to reduce the barriers to building and maintaining Envoy filters. Today, we are announcing WebAssembly Hub, a service for building, deploying, sharing, and discovering Wasm extensions for Envoy.
With WebAssembly Hub, you can:
- Build: the WebAssembly Hub is where users can take their code in their favorite supported language (C, C++, Rust, .NET, Go and more) and build it into a Wasm Envoy extension with a single command.
- Publish: the WebAssembly Hub is a registry for Wasm Envoy extensions where users can store and share their extensions.
- Discover: the WebAssembly Hub is a meeting place for the community to share and consume Wasm Envoy extensions.
- Deploy: the WebAssembly Hub provides all the configuration updates that users need in order to add an extension to Envoy, Istio, Gloo and any other Envoy-based products that support Wasm.
We invite you to join us at the WebAssembly Hub, try out the extensions in the registry, and start building your own Wasm extensions.
- Check out the WebAssembly Hub and read the docs
- Questions? Join the community in slack
- Join the online meetup on Dec 12th at 10am Pacific for a live demo