liveBook · Manning

Serverless computing

As explained in Server-Side WebAssembly

Serverless computing is a cloud model in which the provider manages infrastructure and server operations while applications run in response to events or requests.

Serverless computing runs application code on demand while the platform handles the underlying server operations. Its defining operational pattern is scale to zero: idle workloads are deprovisioned and started again when demand returns. That makes startup latency, memory use, and deployment artifact size central concerns rather than background details. section 1.2.2

WebAssembly (Wasm) is presented as a strong fit for serverless workloads because its small, lightweight containers can start faster than conventional container deployments. Traditional serverless applications can incur cold starts of roughly 300 milliseconds or longer, depending on networking and initialization. For workloads with inactive periods, improved Wasm cold starts were associated with faster responses: 70% for moderate tasks and 90% for basic tasks in the cited comparison. section 1.2.2 section 1.5

When evaluating Wasm for serverless computing, weigh these practical characteristics:

  • Favor it for scale-to-zero services where repeated provisioning makes cold-start time important. section 1.2.2
  • Use its low memory overhead and hardware agnosticism where constrained or varied deployment hardware matters, including edge computing. section 1.3
  • Expect portability from a binary that is independent of its build platform, while checking whether required language packages support Wasm. section 1.5
  • Account for ecosystem limits, especially limited multithreading support and less mature debugging tools than traditional technologies offer. section 1.3 section 1.5

An intermittently used function

Consider an application function that receives requests only after quiet periods. A scale-to-zero platform may have removed its running container, so the next request pays a cold-start cost. Packaging the function as Wasm aims to reduce that restart penalty through a smaller artifact and lower runtime overhead. The benefit is most relevant when inactivity and reprovisioning are frequent, not merely because the function is serverless. section 1.2.2 section 1.3

Table 1.1 Comparing Wasm to traditional technologies across key dimensions

Capability

Wasm

Traditional technologies

Sandboxed execution

Built-in, lightweight isolation

Containers (not as secure), VMs (heavy/slow), or language-specific (Java, .NET)

Cold start

Microseconds

Containers: seconds; VMs: minutes

Artifact size

KBs to low MBs

Containers: 100s of MBs; traditional: varies widely

Portability

Compile once, run anywhere

Docker (platform-specific builds); interpreted languages (performance penalty)

Memory footprint

Minimal overhead

Containers/VMs: significant overhead

Multithreading

Limited (proposals in progress)

Well supported

Ecosystem maturity

Growing (many packages incompatible)

Mature

Debugging tools

Improving but limited

Well established

Runtime performance

Near-native

Varies (native to interpreted)

Compare Wasm with traditional deployment approaches across cold start, artifact size, memory footprint, portability, security, multithreading, debugging, and ecosystem maturity before selecting a serverless runtime. section 1.3

Performance claims should not erase the trade-offs. Wasm can be paired effectively with serverless and edge computing, but some packages may be unavailable, language support differs in maturity, and real-world applications can be constrained by missing multithreading support. Choose it where rapid startup, small deployments, and portability outweigh those current limitations. section 1.3 section 1.5

How Server-Side WebAssembly covers it

How deep it goes
Explains performance rationale and adoption trade-offs, but does not provide a serverless implementation or deployment procedure.
Examples
Uses inactive workloads that scale to zero and comparative response-time measurements for Wasm and traditional serverless applications.
What it assumes
Introduces serverless implications through containers, cold starts, and scale-to-zero behavior without assuming prior Wasm knowledge.
What you can do after
Evaluate/understand when Wasm’s startup, memory, portability, and ecosystem trade-offs suit a serverless workload.
How it connects
Connects serverless computing with WebAssembly, edge computing, containers, cold starts, multithreading, and capability-based security.

Also explained in

Compare how 9 books explain serverless computing →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Server-Side WebAssembly. The section links point to the parts of the book it draws on.