Almost complete rewrite of cache filter#37990
Almost complete rewrite of cache filter#37990ravenblackx wants to merge 81 commits intoenvoyproxy:mainfrom
Conversation
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>
|
/coverage |
|
Coverage for this Pull Request will be rendered here: https://storage.googleapis.com/envoy-pr/37990/coverage/index.html The coverage results are (re-)rendered each time the CI |
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>
|
/retest |
Signed-off-by: Raven Black <ravenblack@dropbox.com>
|
i think this needs some offline resolution /wait |
|
This has run into an immoveable wall - the change to the API has been deemed unacceptable, but the implementation basically can't work usefully without that change, so the whole thing is now irredeemable. The previous state of the cache filter is also bug-ridden and essentially nonfunctional for many use-cases, so this is a serious problem that seems unlikely to be resolved in any direction in the near future. There are two semi-viable proposals for fixing it:
Both of these would also require significant rewrites of the cache filter, again, even if the prerequisites were not blocked. |
|
This pull request has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in 7 days if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions! |
|
This pull request has been automatically closed because it has not had activity in the last 37 days. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions! |
Signed-off-by: Raven Black <ravenblack@dropbox.com>
Signed-off-by: Raven Black <ravenblack@dropbox.com>
|
New plan is to make this |
…d; ok Signed-off-by: Raven Black <ravenblack@dropbox.com>
This is essentially just moving #37990 into a new namespace. In addition to simple renames, some factory functions were changed from using throw to returning StatusOr, `allowed_vary_headers` was hidden as not implemented, and the whole API was tagged WIP as the old version always should have been. There was also a side-effect that the protobuf stableHashKey value for a given cache entry changed because the proto message full-names changed; I bumped the file system cache version so that pre-existing cache entries will be invalidated. From #37990 the improved features of this new cache implementation are: * Thundering-herd resistance (shared streaming from the upstream for cacheable responses) * `vary` headers are unsupported temporarily, rather than broken-supported as they were before. * Range requests now provoke a full upstream request to populate the cache, rather than just passing through and never caching. This may be worse for use-cases that would benefit from partial caching, but neither version supported partial caching. * A lot of work that used to be required of the cache implementation is now part of the cache filter, so cache implementations can be much simpler - essentially just storage now, no need to understand and process vary headers. * Headers and trailers are temporarily cached in memory as well as in the cache storage. * More test coverage. Old cache implementation has an exception in the allowable test coverage file. And the big dubious feature is: * Cache requests to upstream now bypass any filters that are upstream of the cache filter and aren't on the cluster, including e.g. the router filter where add_headers operations would be applied. Some awkward configuration is required (and documented) to work around this constraint. Unfortunately the constraint was unavoidable with how envoy works at this time. Risk Level: Very low since it doesn't change existing APIs and only adds a WIP no-security-posture filter, don't use it! Testing: Loads. Docs Changes: Mostly-duplicate docs for the new version. Release Notes: Follow shortly. Platform Specific Features: No windows support for file system cache, same as before. --------- Signed-off-by: Raven Black <ravenblack@dropbox.com>
|
Replaced by #41148 |
Commit Message: Almost complete rewrite of cache filter
Additional Description: This is necessarily a massive change because the old cache filter was almost non-functional. Important differences:
varyheaders has been removed pending another (much smaller) PR - turns out the old implementation had bugged support that led to crashes. At this version the behavior in the presence ofvaryheaders is to not cache, meaning results will be correct but the cache will not be useful. Postponing is in aid of getting this PR landed because it's blocking various other things - correctvarysupport requires a lot more test coverage.CacheSession). This will use a bit more memory than having everything offloaded to the cache implementation (for cache implementations that didn't keep anything in memory).Risk Level: Pretty bad, but the filter is still tagged WIP, so not critical risk.
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: Added details of the new rather more awkward configuration requirements.
Release Notes: Yes.
Platform Specific Features: n/a