Skip to content
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

Almost complete rewrite of cache filter #37990

Draft
wants to merge 20 commits into
base: main
Choose a base branch
from

Conversation

ravenblackx
Copy link
Contributor

Commit Message: Almost complete rewrite of cache filter
Additional Description: WIP - does not yet support vary headers (turns out the old one only did it poorly too, but I guess we can't step one thing backwards to fix all the other things this fixes). This is necessarily a massive change because the old cache filter was almost non-functional. Important differences:

  1. it's now resilient against "thundering herd" problem - only one request goes upstream if there are multiple simultaneous requests for the same resource.
  2. it now works with range requests, which, if there previously were only range requests, as can happen with Microsoft BITS as a client, would all just bypass the cache. The new behavior is a range request causes a full file request upstream, and then serves the range response once the requested part of the file is cached. This could be improved by also supporting partial cache entries, but it's reasonable for that to be a later PR.
  3. a lot of work that the cache filter previously offloaded to the cache implementation is now owned by the cache filter (e.g. vary headers, validation, thundering herd resistance). This makes cache implementation much less onerous, but adds some intermediate layers.
    Risk Level: Pretty bad, but the filter is still tagged WIP, so not critical.
    Testing: There's quite a lot, but still needs a bit more coverage. Existing integration tests still function mostly as they were, and added integration tests for range and parallel requests which would have failed with the old cache.
    Docs Changes: Internal only.
    Release Notes: Not yet.
    Platform Specific Features: n/a

Signed-off-by: Raven Black <ravenblack@dropbox.com>
Copy link

As a reminder, PRs marked as draft will not be automatically assigned reviewers,
or be handled by maintainer-oncall triage.

Please mark your PR as ready when you want it to be reviewed!

🐱

Caused by: #37990 was opened by ravenblackx.

see: more, trace.

Signed-off-by: Raven Black <ravenblack@dropbox.com>
Signed-off-by: Raven Black <ravenblack@dropbox.com>
Signed-off-by: Raven Black <ravenblack@dropbox.com>
Signed-off-by: Raven Black <ravenblack@dropbox.com>
Signed-off-by: Raven Black <ravenblack@dropbox.com>
Signed-off-by: Raven Black <ravenblack@dropbox.com>
Signed-off-by: Raven Black <ravenblack@dropbox.com>
Signed-off-by: Raven Black <ravenblack@dropbox.com>
Signed-off-by: Raven Black <ravenblack@dropbox.com>
Signed-off-by: Raven Black <ravenblack@dropbox.com>
Signed-off-by: Raven Black <ravenblack@dropbox.com>
Signed-off-by: Raven Black <ravenblack@dropbox.com>
Signed-off-by: Raven Black <ravenblack@dropbox.com>
Signed-off-by: Raven Black <ravenblack@dropbox.com>
Signed-off-by: Raven Black <ravenblack@dropbox.com>
Signed-off-by: Raven Black <ravenblack@dropbox.com>
Signed-off-by: Raven Black <ravenblack@dropbox.com>
Signed-off-by: Raven Black <ravenblack@dropbox.com>
Signed-off-by: Raven Black <ravenblack@dropbox.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant