mirror of
https://github.com/floci-io/floci.git
synced 2026-11-28 16:11:48 -05:00
* feat(lambdaweb): scale environments per endpoint and apply maxEnvironments and rateLimit Each endpoint keeps its own pool of environments, as on AWS. An environment takes up to the revision's maxConcurrencyPerEnvironment requests at once, the least busy one first so requests rotate, and a request that finds every environment full starts another or waits for one that is starting. At maxEnvironments the request gets the 429 page with Platform.EndpointMaxEnvThrottle. A rateLimit admits a burst of up to rateLimit requests refilled at rateLimit per second and refuses the rest with Platform.EndpointRequestThrottle. Both pages were recorded against AWS. Part of #5699 * fix(lambdaweb): key environment pools by endpoint creation and let a new revision take an idle slot A recreated endpoint gets a new domain, so it no longer reuses the environments of the deleted one. At maxEnvironments an idle environment of another revision is stopped to make room. Empty pools are dropped. The burst in the Docker test now arrives at once, so a slow runner still goes past the rate. * fix(lambdaweb): keep the rate limiter clock monotonic and drop refilled buckets A bucket untouched for a second is full, so it is dropped. A clock read that lands behind the bucket no longer takes tokens back.