PR #898 introduces capacity limits to the balancer. However, because the router supports "single-use" routes--routes that are bound only for the life of a single HTTP1 request--it is easy for a router to exceed its configured capacity. In order to fix this, the `Reuse` type is removed from the router library so that _all_ routes are considered cacheable. It's now the responsibility of the bound service to enforce policies with regards to client retention. Routes were not added to the cache when the service could not be used to process more than a single request. Now, `Bind` wraps its returned services (via the `Binding` type), that dictate whether a single client is reused or if one is bound for each request. This enables all routes to be cached without changing behavior with regards to connection reuse. |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |