Open lann opened 1 year ago
This is a little tricky to implement as wasmtime doesn't expose the current live instance count and even if it did we would need some signal that the count has changed or would need to awkwardly poll the count in a loop.
We could alternatively track instances ourselves with some wrapper of Instance
s that tracks the count on new
/drop
.
Currently Spin returns an error "maximum concurrent instance limit of 1000 reached" when more than 1000 (by default) concurrent requests are made. Rather than failing, Spin should block new requests while waiting for instances to complete, providing backpressure.