Skip to content

Restore listenfd suport for wasmtime serve #14289

Description

@simolus3

Feature

I want to serve a wasi:http/service component that I expect won't receive requests very frequently. So instead of keeping a wasmtime serve process running, I'd like to rely on systemd socket activation to start that process when a request comes in and shut it down after a while of inactivity.

#3729 originally added the --listenfd option, but that doesn't appear to do anything anymore. I think it would be a good option to allow wasmtime serve to inherit sockets from a service manager instead of creating and binding one itself.

Benefit

Since wasmtime can launch components quickly, I wouldn't have to keep a process around unless it's actively serving a request.

Implementation

I suppose we can re-use the approach from #3729 but only implement it for wasmtime serve .

FWIW I'm happy to open a PR for this if this sounds like a feature worth adding again.

Alternatives

Using something like systemd-socket-proxyd I guess?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions