logo

Create Istio Filters with Any Programming Language

2023-04-20

Authors:   Rafael Fernández López, Angel M De Miguel Meana


Summary

The presentation discusses the use of webassembly and istio to extend the functionality of proxies in Kubernetes clusters.
  • The goal is to demonstrate the possibility of using webassembly to run filters in languages other than C++
  • Istio provides a way to extend proxies with webassembly filters and configure them with HML configuration
  • The filters can be pushed to a default register and pulled by the proxies
  • The webassembly models are portable and can be used in different platforms
  • There is an API to perform HTTP requests outbound and get state from the outside world
The presenters attended a conference where the Kong team presented the proxy wasn'tum in nginx and the com platform. They contacted Kong and discussed the possibility of using different languages for filtering. Kong announced a new project called wasang X that adds the proxy was some filters in nginx and for extension in the Kong platform. The great thing about this is that once they had the JavaScript filter with the webassembly model, they only had to send that specific model to Kong. They didn't have to worry about recompiling or architecture. It works in Kong and anything that implements a proxy was an interface.

Abstract

This talk showcases how you can create Istio / Envoy filters using almost any programming language with WebAssembly. We will showcase a demo of a filter developed using an interpreted language. Istio is a Service Mesh that routes a considerable amount of traffic on the Internet. Having the ability to extend its functionality using filters allow developers to implement many custom features. With WebAssembly and ProxyWasm, you can create filters using languages like Go, Rust, and Zig. All mentioned languages are compiled ones. What if you can extend it even more? What if you can use the same interpreted language that powers your backend? In this case, you can reuse your knowledge to create these filters. You don't need to learn a new language to write a filter for Istio. This flexibility simplifies the development process and ensures any team can build its filters. After this talk, you will know how to create a filter using an interpreted language. You will learn the requirements, tools, processes, and limitations.

Materials: