Istio 1.5 taps WebAssembly to power extensions

The Kubernetes service mesh project now uses the new web-native binary system to expand its capabilities

Istio 1.5 taps WebAssembly to power extensions

Istio, the Kubernetes service mesh that manages the networks used by microservices, uses a technology in its new 1.5 release that might seem out of place: WebAssembly, the binary code format that provides near-native execution speed across many platforms.

It’s more evidence of how WebAssembly is making inroads as a programming technology in general, not just as a way to build high-performance web applications.

The Istio project plans to use WebAssembly (or Wasm for short) to handle extensibility and add-ons with a related project, Envoy. Envoy, originally written by engineers at Lyft, provides network proxying services, so Istio can focus on higher-level abstractions. Both projects can be extended, but use different mechanisms: Istio uses a model called Mixer, while Envoy has an extension system of its own.

According to an official blog post by the Istio project team, both approaches had issues: Istio’s was limited and inefficient; Envoy’s was difficult. Writing extensions in Wasm makes both development and deployment easier. Also, since Wasm’s execution environment is sandboxed by default, crashes from buggy extension code can be contained.

Another advantage noted by the Istio team is that many languages can be compiled to Wasm—not just web-first languages like JavaScript or TypeScript, but also machine-native languages like C++ and Rust. Thus Istio developers can draw on many more programming languages when developing extensions.

The plan for adding Wasm support to Envoy and Istio is to first provide it for both projects internally, then move a number of Istio’s  extensions into Envoy. The third step, compiling those extensions as Wasm, will be optional at first, but the long-term plan is to make Wasm the default once the transitional kinks are worked out.

Finally, Istio’s team plans to make code examples available for re-use via WebAssembly Hub, a code repository for Envoy and Istio Wasm extensions. Developers can upload code in languages that compile to Wasm, and have the resulting Wasm code hosted on the Hub. Early adopters can start using the Hub now, although the Hub currently has only a small number of demo and example projects.

Copyright © 2020 IDG Communications, Inc.