WebAssembly / WebAssembly/WASI

Document wasi:http p3 instance reuse

Open
#898 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

P-http
Dominant language
Rust
Stars
5.8k
Forks
333
Avg merge
2d 13h
Merged PRs (30d)
3

Description

@tschneidereit and I have had informal discussions about host implementations reusing a given instance to handle multiple incoming requests by default for wasi:http@0.3.0 and beyond, and currently Wasmtime does this.

However, I don't know that this has been documented anywhere in the spec, nor do we yet have clear guidelines on how a component could opt out of reuse (e.g. with some combination of backpressure.dec, graceful shutdown, and wasi:cli/exit#exit). This would be helpful for both host and guest implementors.

Note that I'm mostly thinking of inbound wasi:http handlers here, but reuse can also be relevant for arbitrary components, so I'm not totally sure where this sort of thing should be specified.

Also note that this overlaps with, but is distinct from, #807, which concerns instances meant to run indefinitely, whereas this is about hosts reusing instances only a short time as an optimization which guest components should not rely heavily on for correctness.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the wasi:http@0.3.0 behavior described in the issue and compare it with #807. Determine where instance reuse belongs in the specification, then define host reuse expectations and how guest components can opt out. Done means the spec documents reuse semantics and clear guidance for host and guest implementors.

Written by the indexing model from the issue text.

Assessment

Tech stack
wasm
Domain
api, documentation
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.