Start United States USA — software Kubernetes Native Gateway Series (Part 3): WebAssembly at Scale With Gloo Edge

Kubernetes Native Gateway Series (Part 3): WebAssembly at Scale With Gloo Edge

223
0
TEILEN

Learn about WebAssembly and how to get it working with high-scale apps with some help from Gloo Edge.
Join the DZone community and get the full member experience. WebAssembly (abbreviated Wasm) is a binary instruction format for a stack-based virtual machine. Wasm is designed as a portable compilation target for programming languages, enabling deployment on the web for client and server applications. At Solo.io, we are very excited about Web Assembly as a way to extend our Envoy Proxy-based API Gateway ( Gloo Edge) and the most popular Service Mesh ( Istio). We recently made it very easy to use WebAssembly with Gloo Edge and Gloo Mesh. This is the last blog post of a series about Gloo Edge scalability. In the first blog post, Envoy at Scale with Gloo Edge, we performed benchmarks to determine how Gloo Edge was able to scale in terms of Requests Per Second (RPS.) We also provided information about the throughput one can expect based on the number of CPUs allocated to the gateway-proxy (Envoy) pod. In the second blog post, Security at Scale with Gloo Edge, we measured the impact of enabling different security features, including HTTPS, JWT, API keys, and WAF. In this blog post, we’ll measure the impact of deploying a Web Assembly (Wasm) filter to modify the request or response headers or body. We know based on my previous tests that we could get close to 90,000 RPS with standard HTTP requests when we don’t set any CPU limits on the gateway-proxy pod. In the following tests, we’ll compare the impact with a limit configured to eight CPUs and without a limit. With a limit of eight CPUs, we could get more than 16,000 RPS with standard HTTP requests. To be able to create a regex filter, we need to pick a language that includes a regex package and can be compiled in Wasm format. When we started to work on this filter, we wanted to use AssemblyScript, but there was no regex support at that time. (There is now a community module.) So, we decided to use TinyGo, but when we started to test my filter, we discovered that it was always crashing due to out-of-memory issues. We opened an issue on the TinyGo repository which has now been fixed.

Continue reading...