Jacar mascot — reading along A laptop whose eyes follow your cursor while you read.
Arquitectura Tecnología

containerd with Wasm: mixed workloads in production

containerd with Wasm: mixed workloads in production

Actualizado: 2026-05-03

The promise of WebAssembly as a server-side runtime has gone through several phases since 2019. With stable runwasi, runtimes like WasmEdge and wasmtime integrated without friction, and mature Kubernetes support via RuntimeClass, it’s reasonable to ask whether the moment has arrived to mix Wasm workloads with classical Linux containers in production. The answer is nuanced and depends heavily on use case.

Key takeaways

  • containerd supports alternative shims via runwasi since containerd 1.7 without external patches.
  • The most mature production runtimes are WasmEdge (server-oriented, native WASI Preview 2) and wasmtime (Bytecode Alliance technical reference).
  • Real Wasm advantages over Linux containers: startup (<10 ms vs hundreds of ms), image size (1–5 MB vs 20–40 MB), and by-design security (memory sandbox without shared kernel).
  • Real limits: language ecosystem (Rust and C mature, Java and Python experimental), more limited network access than standard Linux, and less mature observability.
  • Adoption makes sense for internal serverless, distributed edge, and untrusted code execution; not for long-running services with mature language ecosystems.

How Wasm integrates into containerd

containerd has a shim architecture: small processes implementing the low-level interface between containerd and the actual container engine. The default shim is runc for Linux containers. The runwasi project (started by Microsoft, now CNCF sandbox) provides alternative shims connecting containerd with WebAssembly runtimes. Since containerd 1.7 the integration is supported without external patches.

In Kubernetes, the integration mechanism is the RuntimeClass object. The mental model is clean: the node can run Linux containers and Wasm modules simultaneously, the scheduler knows it, and the developer just picks the appropriate class. This mixed-runtime model is analogous to the gVisor and alternative runtimes pattern where different isolation levels coexist in the same cluster.

Where the difference is real

Startup: Linux container: tens to hundreds of milliseconds from warm image; equivalent Wasm module: under 10 ms. Decisive for on-demand function-like workloads.

Image size: 1–5 MB for Wasm vs 20–40 MB for Linux OCI images. Real bandwidth difference for edge with hundreds of locations.

Security by construction: a Wasm module runs inside a by-design memory-safe VM with system access only via explicitly granted WASI. Qualitatively less attack surface than Linux containers.

Cross-architecture portability: a compiled Wasm module runs the same on x86_64, arm64, or unusual platforms without recompilation. Simplifies build pipelines for heterogeneous edge fleets.

Limitations to acknowledge

Language ecosystem: Rust is mature for Wasm, Go works with limitations, C and C++ via wasi-sdk work well. Java, Python, Node.js, and .NET remain hard or experimental. If the primary stack is enterprise Java or Python with native dependencies, migrating to Wasm is not a realistic option.

Network and system access: WASI Preview 2 added TCP and UDP socket support but the API is still more limited than standard Linux.

Observability: standard Kubernetes observability tools assume Linux processes with /proc and cgroups. A Wasm module has its own metrics API that must be wired explicitly. OpenTelemetry has reasonable Wasm support, but maturity doesn’t match the traditional Linux ecosystem. Integrating this from the start with the 2026 observability stack is essential to avoid operating blind.

When it pays off and when it doesn’t

Pays off in three scenarios: internal serverless platform, edge and geographically distributed deployment, and untrusted code execution.

Doesn’t pay off for long-running services with mature language ecosystems, workloads with complex network or system-access requirements, or teams lacking operational capacity for two runtime surfaces.

The practical recommendation: evaluate before adopting. Identify a concrete workload where the Wasm benefit is clear, build a test cluster, deploy, measure, and only proceed if the numbers justify the added complexity. Don’t migrate existing services for migration’s sake. Integrate observability from the first deployment.

Was this useful?
[Total: 10 · Average: 4.1]

Written by

CEO - Jacar Systems

Passionate about technology, cloud infrastructure and artificial intelligence. Writes about DevOps, AI, platforms and software from Madrid.