Developer Seeks Zero-Copy Streaming Architecture for Wasmtime-Based API Gateway
A developer is building a high-performance API gateway that runs business logic inside Wasmtime WebAssembly components using WASI, handling HTTP/1.x, HTTP/2 via hyper, and HTTP/3 via h3-quinn. The core challenge is avoiding memory copies when passing large request bodies or streaming responses across the host-guest sandbox boundary. Key open questions include how to map host-side bytes::Bytes buffers into Wasm linear memory without CPU-intensive memcpy operations, and how to adapt asynchronous stream abstractions from hyper and h3 into the wasi:io/streams interface without blocking the Tokio runtime. The developer also wants to ensure backpressure signals from the Wasm guest propagate correctly back to Quinn's congestion controller and Hyper's connection pool to prevent unbounded host-side buffering. Community input is being sought on architectural patterns, existing code references, and known limitations in this area.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in