Skip to main content
Version: 0.82

Hosts

Overview

The wasmCloud host is an application runtime. The host is responsible for loading, instantiating, and communicating among WebAssembly components and capability providers, in a secure, distributed way.

Servers as commodity

A core design principle of wasmCloud is that the health of the lattice and applications running on it should not be dependent on any particular host. Hosts are designed to be interchangeable and should be able to start and stop without causing downtime. While it's possible to run a single host in a lattice, it's also possible for workloads to be distributed across many hosts, and for those hosts to be dynamically scaling up and down in response to changing demand.

A Secure Sandbox

WebAssembly components require a runtime to execute. The wasmCloud host is not a WebAssembly runtime. The wasmCloud host uses Wasmtime, a fast, secure, and standards-compliant runtime that supports the Component Model, as its WebAssembly runtime. wasmCloud adds additional layers of security on top of the runtime as part of its zero trust security model.

Distributed Observability

Observability is always important, but becomes essential in a distributed environment. wasmCloud is committed to providing first-class support for observability via the "three pillars."

Logs

Hosts emit unstructured (text) or structured (JSON) logs. The log level and format can be configured for each host at start time.

Tracing

wasmCloud supports OpenTelemetry for distributed tracing. When configured, the host will emit tracing data in response to every RPC call and control interface request. At this time, the primary host runtime supports OTLP for exporting tracing data to a collector.

Metrics

info

🚧 Under construction 🚧

Design for exporting metrics via OpenTelemetry is underway. See the RFC for more information.

For more information about how to configure wasmCloud for observability, see the observability section of the deployment guide.

RPC as a Bridge to Capabilities

wasmCloud actors cannot directly access capabilities. Instead, the host subscribes to incoming messages and makes outbound requests on behalf of actors, using the wasmCloud RPC protocol. This removes the need for actors (and developers!) to have any knowledge of the underlying transport mechanism, and allows the host to run untrusted components without compromising security.

The Control Interface

The API for managing hosts, their inventories (actors and providers), and host/lattice metadata is a set of NATS subscriptions. A separate server is not needed to manage hosts and the lattice. Instead, each host within a lattice subscribes to NATS subjects corresponding to its own responsibilities, as well as lattice-wide subjects.

Interoperable Events

Hosts will emit CloudEvents during normal operation, as well as in response to errors. These events reflect coarse-grained state changes for a lattice. This event log is useful for monitoring and observability, and is used internally by wadm to track whether applications have been successfully deployed.