-
Notifications
You must be signed in to change notification settings - Fork 308
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.