wasmCloud: The Kubernetes for WebAssembly | Horovits

wasmCloud: The Kubernetes for WebAssembly

Dotan Horovits (@horovits)
7 min readOct 5, 2024

--

Recently, I had the pleasure of hosting Taylor Thomas on OpenObservability Talks, where we delved into the fascinating world of WebAssembly (a.k.a. WASM or Wasm). On my previous recap blog I covered WebAssembly essentials and current state, its use cases and benefits in comparison to containers, its maturity and support among various programming languages, operating systems and runtime environments, the standardization efforts and more.

On this post I’ll put the spotlight on the wasmCloud open-source project. wasmCloud is an exciting WebAssembly framework under the Cloud Native Computing Foundation (CNCF), which has recently celebrated its first major release, wasmCloud v1. Let’s dive into what makes wasmCloud a game-changer for running WebAssembly components in production.

My guest for the episode was Taylor Thomas, one of the creators and maintainers of wasmCloud. He’s also Engineering Director at Cosmonic and serves as a co-chair for the CNCF’s WASM working group. His work at Intel, Nike, and Microsoft spanned various containers and Kubernetes platforms as well as WebAssembly platforms.

OpenObservability Talks: WebAssembly: The Next Frontier in Cloud-Native Evolution

What is wasmCloud?

According to the wasmCloud GitHub page, wasmCloud is a universal application platform that helps you build and run globally distributed WebAssembly applications on any cloud or edge. According to Taylor, it’s the best way to run WebAssembly components in production. In essence, he says, wasmCloud is a Kubernetes for WebAssembly.

At its core, wasmCloud offers a component model that allows for pluggable interfaces, distributed deployment, and hot-swappable components. It employs a flat network topology of hosts, which you can think of as the Kubelet for Kubernetes nodes. These can run on any type of device from VMs and bare-metal servers to devices as small as a Raspberry Pi.

The result is a geo-distributed application, in which everything uses standard interfaces to talk to each other. One of the advantages of these interfaces is the ability to hot-swap external dependencies, or “providers’’ as they’re called in wasmCloud. For example, if you have a bug or a newly-discovered security vulnerability in a Redis client, you can just swap out the provider and everything using that provider gets the new version and the security update. You can read more on WebAssembly System Interfaces (WASI) in this article.

The Journey to the first GA

wasmCloud reached general availability (GA) in March 2024 with the release of wasmCloud 1.0. The project’s journey to v1.0 is a testament to its vibrant community and growing interest in productizing WebAssembly. Taylor emphasized their commitment to semantic versioning (SemVer) and backwards compatibility.

“Pretty much anything you wrote for wasmCloud, even before it was called wasmCloud, will still run,” he noted. Not often do I encounter such statements from such a young project, in stages where many design decisions take place and threaten to break backwards compatibility.

wasmCloud was accepted into the CNCF sandbox back in 2021, and is now on its way to the next maturity level, namely CNCF incubation. Taylor shares that “It’s in the review phase right now with the TOC [Technical Oversight Committee of the CNCF]”. So who knows, we may have interesting news for KubeCon North America 2024.

Observability and OpenTelemetry support

As the host of OpenObservability Talks, I couldn’t resist diving into how observability of WASM applications is addressed and what wasmCloud has to offer in that regard. It was nice to see that wasmCloud has aligned with OpenTelemetry (another CNCF project) as its standard way to expose telemetry, and that the v1 release brings full support of OpenTelemetry traces, logs and metrics.

Taylor explained, “You can see in your call graph, if you pull it up in Jaeger, your application’s flow across different regions, with no extra effort on your part.” This seamless observability is crucial for debugging and optimizing distributed applications.

This neatly aligns with the standardization efforts around the WebAssembly System Interface with the WASI-Observe specification.

Architecture and Capabilities

One of wasmCloud’s standout features is its flat network topology. hosts can run on a wide range of devices, from Raspberry Pi Zero 2 W to large VMs or bare-metal servers. This flexibility is powered by NATS, another CNCF project, enabling seamless communication across geo-distributed applications, and can actually bridge across Kubernetes clusters. Taylor shares their internal joke, that “we unintentionally solve Kubernetes Federation doing this.”, though he admits it’s only “80% true”.

In fact, you can deploy wasmCloud on Kubernetes quite seamlessly using the wasmCloud operator, which runs wasmCloud hosts on a Kubernetes cluster. Taylor emphasizes additional advantages for Kubernetes users: “we can extend the frontiers of Kubernetes in traditional challenge areas like multi-region, multi-cluster, multi-cloud, and edge environments.”

wasmCloud allows developers to build components that are not tied to any specific framework. Taylor made it clear: “You’re not building something for wasmCloud; you’re building a component and then running it in wasmCloud.” This approach fosters interoperability and ease of migration across different environments.

wasmCloud for Platform Engineering

The elegant decoupling offered by wasmCloud made me wonder about its benefits for platform engineering. These days, we find too often that developers suffer from cognitive load, needing to know Kubernetes and other related infrastructure, while platform engineers have to know what their application’s dependencies are and what they’re running.

Taylor immediately emphasized, and shared his battle stories from the platform team: “we had Log4J, so let me go talk to all the people who are running Java containers and get them to rerun their pipelines and rebuild the things.” From the flip side, the developers have to know which CRDs you have installed, which database and similar details. This causes much frustration and friction between Dev and the Platform team.

Taylor highlighted how wasmCloud can bridge the gap between developers and operations: With wasmCloud, platform engineers can define interfaces, allowing developers to code against these without worrying about the underlying infrastructure. This decoupling streamlines workflows, reducing friction and increasing productivity. It also makes you wonder if the templating approach commonly employed in developer platforms, like copying CRDs, can be made obsolete with this approach.

Use Cases and Industry Adoption

The use cases for wasmCloud are as diverse as they are impressive. From extending out to IoT devices on factory floors to supporting untrusted code execution at Adobe, wasmCloud is proving its flexibility. Taylor highlighted a few case studies, including:

Machine Metrics: Utilizing WASM to extend out to IoT devices on the edge, such as factory floor machines, and then stream back metrics data from the devices.

Orange and TM Forum: Extending applications to the edge for telecommunications.

Adobe: Brought up cost reduction and the ability to support untrusted code from external users. Check out the excellent talk by Adobe engineering at WASM Day 2023.

The Road Ahead

wasmCloud is moving full steam ahead, and has already released two minor releases since the GA, with the latest, at the time of writing, being wasmCloud v1.2. Taylor shared some exciting updates on the wasmCloud roadmap, including:

  • Full support for secrets management.
  • Improved developer workflows and documentation.
  • Enhanced support for long-running workloads and dynamic configuration updates.

This is just part of the list. Check out the full wasmCloud roadmap for more details.

Community and Collaboration

Cosmonic, Taylor’s company, is a major driving force behind wasmCloud. However, assured us Taylor, the project is far from a one-company show. The current wasmCloud adopters list includes also Orange and SigScale and MachineMetrics, all stating using it internally or in early prototyping stages.

While public stories of production usage are still scarce, Taylor shared that contributors from various organizations and individual developers play a significant role in its evolution, and invited everyone to take part and influence the project.

If you’re interested in wasmCloud, join the conversation on the wasmCloud Slack, or the GitHub discussions. There are also community meetings you can join to see the faces and engage in the discussion.

Conclusion

wasmCloud is setting new standards for running WebAssembly in production. Its open-source nature, coupled with robust features and strong community support, makes it a promising platform for developers and organizations looking to leverage WebAssembly’s potential.

Want to learn more? Check out the OpenObservability Talks latest episode: WebAssembly: The Next Frontier in Cloud-Native Evolution.

--

--

Dotan Horovits (@horovits)
Dotan Horovits (@horovits)

Written by Dotan Horovits (@horovits)

Technology evangelist, CNCF Ambassador, open source enthusiast, DevOps aficionado. Social: @horovits YouTube: @horovits Podcast: OpenObservability Talks

No responses yet