Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Cloud-Native vNext: WebAssembly in Azure and AKS

Cloud-Native vNext: WebAssembly in Azure and AKS

WebAssembly is the next big thing on the server and in the cloud. With WebAssembly we can drive hardware utilization and reduce cloud spendings dramatically. In Azure we can run WebAssembly workloads in Azure Kubernetes Service (AKS) and combine both: Containers and WebAssembly. Join this talk by Azure MVP and cloud-native enthusiast Thorsten Hans to get those questions answered. It’s time to embrace the platform of the future.

Thorsten Hans

December 13, 2022
Tweet

More Decks by Thorsten Hans

Other Decks in Technology

Transcript

  1. Key Concepts • WebAssembly (Wasm) • WebAssembly System Interface (WASI)

    • WebAssembly Gateway Interface (WAGI) Introduction
  2. WebAssembly (Wasm) 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. Introduction https://webassembly.org/
  3. WebAssembly (Wasm) Introduction fast Near native execution performance, leveraging available

    hardware capabilities safe Wasm is a memory-safe and sandboxed execution environment portable All major browsers support Wasm & multiple server runtimes are available open WebAssembly Text Format .wat can be used to learn, read ,debug Wasm
  4. WebAssembly System Interface (WASI) • A standard engine-independent non-web system-oriented

    API for WebAssembly • WASI is here to standardize how Wasm is executed outside of the browser • Wasm uses platform agnostic APIs provided by WASI • WASI interacts with platform specific APIs • WASI aligns with the Wasm promise of being a secure sandbox • As developer, WASI is your compilation target cargo build --target wasm32-wasi Introduction
  5. WebAssembly Gateway Interface (WAGI) • Use WebAssembly modules as HTTP

    handlers • Think of a hyper-focused microservices runtime • Comman Gateway Interface (CGI) implementation • HTTP headers become environment variables • HTTP payloads are piped to stdin • HTTP responses must be written to stdout Introduction
  6. • Fermyon Technologies (founded in November 2021) • https://www.fermyon.com/ •

    ”Pioneering the next wave of cloud computing” • Many familiar faces that you may know from Deis Labs (aquired by Microsoft in April 2017) • Fermyon is all about WebAssembly on the server and in the cloud Who is Fermyon
  7. • Spin is a runtime that hosts and instantiates Wasm

    modules when triggers are invoked • It leverages the WebAsssembly Component Model • Spin is an SDK • That provides APIs for common scenarios like outbound HTTP, Redis, PostgreSQL • Spin is a developer toolchain • For crafting, running, and deploying your applications • Spin is language agnostic • You can use any language that compiles to wasm32_wasi What is Spin
  8. • Microsoft (especially the OSS team in the Azure Division)

    is already adopting it in AKS • https://www.infoworld.com/article/3681853/azure-kubernetes-doubles-down-on-webassembly.html • Previously Krustlet (Kubelet written in Rust 🦀) was used to run WebAssembly workloads • Microsoft announced the preview of their new WASM story at Ignite 2022 • Dedicated AKS Node Pools support wasm32_wasi leveraging runwasi • runwasi is used in conjunction with containerd-shims for SpiderLightning (slight) and Spin 🎉 WebAssembly in Azure and AKS
  9. • TBH: its still early • Plain Container Image is

    used for distribution • As of today, only simple workloads are supported WebAssembly in Azure and AKS
  10. • The combination of Containers & WASM will become the

    default • The imapact of Wasm will be way bigger for backend devs compared to frontend devs • Running Wasm workloads in the cloud will allow better resource utilization • Strict sandboxing (WASI) will enahnce overall platform security and robustness • It’s still early – especially in managed Kubernetes (where we’ve limited control) • Spin and Fermyon Cloud (or Platform) currently drive developer adoption Conclusion