-
Notifications
You must be signed in to change notification settings - Fork 271
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cache: Let services self-evict #456
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
overall, this LGTM, though i definitely agree we should figure out what's up with the test failure before moving forwards with it.
This change modifies the `cache` crate to remove its background task which is responsible for tracking service use and evicting idle services. Now, the cache (1) has no capacity limit and (2) evicts services from the cache when they drop their underlying service. This is accomplished by modifying the `CacheLayer` to accept a layer that is responsible for making the inner service shareable and for dropping its inner service when it should be considered defunct. This is accomplished by moving an `Arc<()>` into the inner stack and holding a `Weak<()>` reference to it in the cache module. Then, before a request is processed by the cache, it attempts to upgrade each cache entry and drops services that have dropped the inner service (holding the strong reference).
1c5a3c3
to
5fb6942
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
This release builds on changes in the prior release to ensure that balancers process updates eagerly. Cache capacity limitations have been removed; and services now fail eagerly, rather than making all requests wait for the timeout to expire. Also, a bug was fixed in the way the `LINKERD2_PROXY_LOG` env variable is parsed. --- * Introduce a backpressure-propagating buffer (linkerd/linkerd2-proxy#451) * trace: update tracing-subscriber to 0.2.3 (linkerd/linkerd2-proxy#455) * timeout: Introduce FailFast, Idle, and Probe middlewares (linkerd/linkerd2-proxy#452) * cache: Let services self-evict (linkerd/linkerd2-proxy#456)
This release builds on changes in the prior release to ensure that balancers process updates eagerly. Cache capacity limitations have been removed; and services now fail eagerly, rather than making all requests wait for the timeout to expire. Also, a bug was fixed in the way the `LINKERD2_PROXY_LOG` env variable is parsed. --- * Introduce a backpressure-propagating buffer (linkerd/linkerd2-proxy#451) * trace: update tracing-subscriber to 0.2.3 (linkerd/linkerd2-proxy#455) * timeout: Introduce FailFast, Idle, and Probe middlewares (linkerd/linkerd2-proxy#452) * cache: Let services self-evict (linkerd/linkerd2-proxy#456)
This change modifies the
cache
crate to remove its background taskwhich is responsible for tracking service use and evicting idle
services.
Now, the cache (1) has no capacity limit and (2) evicts services from
the cache when they drop their underlying service.
This is accomplished by modifying the
CacheLayer
to accept a layerthat is responsible for making the inner service shareable and for
dropping its inner service when it should be considered defunct. This is
accomplished by moving an
Arc<()>
into the inner stack and holding aWeak<()>
reference to it in the cache module. Then, before a requestis processed by the cache, it attempts to upgrade each cache entry and
drops services that have dropped the inner service (holding the strong
reference).