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

Support http caching #868

Closed
tschroed opened this issue Apr 30, 2017 · 11 comments
Closed

Support http caching #868

tschroed opened this issue Apr 30, 2017 · 11 comments
Labels
enhancement Feature requests. Not bugs or questions. help wanted Needs help!

Comments

@tschroed
Copy link
Contributor

As a generic http proxy, it would be useful for Envoy to support http caching. It seems like this could probably implemented as a filter.

@mattklein123 mattklein123 added the enhancement Feature requests. Not bugs or questions. label Apr 30, 2017
@ctrlrsf
Copy link

ctrlrsf commented May 1, 2017

I agree! This would be a killer feature. Right now using an nginx proxy to cache some API calls.

@PiotrSikora
Copy link
Contributor

Do we want to cache inside Envoy or "one RPC away"?

@tschroed
Copy link
Contributor Author

tschroed commented May 2, 2017

Yes?

It would be nice to have an in-memory L1 for hot objects and larger out-of-process L2 for less-popular content. Obviously caching policy would need to be context dependent as it typically doesn't make sense to cache the result of API calls while user-facing web pages can be cached even an RPC away without imposing user-perceivable delay.

@mattklein123
Copy link
Member

If we end up doing this, it should definitely be a filter. Also, I would like to investigate whether we can avoid reinventing the wheel and potentially use some existing caching library. At some point I think I looked into it and the actual caching portion of varnish is exposed as a library, but I can't remember now.

@josephjacks
Copy link
Contributor

josephjacks commented May 2, 2017

@mattklein123 Fastly's h2o is taking over a lot of the prior use around Varnish (except for caching which they still use Varnish for) and there is a library: https://github.com/h2o/h2o/labels/libh2o -- there may be some h2o overlap with Envoy but I do agree that reinventing wheel could be bad.

Also h2o/h2o#173 (comment)

@PiotrSikora
Copy link
Contributor

@josephjacks like you said, Fastly is using h2o in front of Varnish (mostly for HTTP/2 and TLS termination), and (lib)h2o doesn't provide any support for caching (see: h2o/h2o#776), so using it wouldn't help us.

@jmarantz
Copy link
Contributor

xrefing #3023 which is about auth-caching, but would potentially introduce a physical cache into Envoy (though the requirements on an auth-class may be different from those on an http-cache).

@toddmgreer
Copy link
Contributor

I have a high-level proposal for an Envoy HTTP caching filter. It handles the full range of HTTP caching, including vary headers, conditionals, ranges, and validation, but delegates actual storage to a set of pluggable interface classes, to enable varied types of caching.

Please see https://docs.google.com/document/d/1WPuim_GzhfdsnIj_tf-fIeutK0jO4aVQfVrLJFoLN3g/view, and let me know what you think.

@htuch
Copy link
Member

htuch commented Feb 11, 2019

@toddmgreer can you share from your personal gmail? We recently changed our policy to disallow design proposal that need whitelist ACL to access (I was the terrible person who last tried to do this ;) ). See the second point under Communication at https://github.com/envoyproxy/envoy/blob/master/CONTRIBUTING.md.

@toddmgreer
Copy link
Contributor

toddmgreer commented Feb 11, 2019 via email

toddmgreer added a commit to toddmgreer/envoy that referenced this issue Jun 7, 2019
toddmgreer added a commit to toddmgreer/envoy that referenced this issue Jun 7, 2019
toddmgreer added a commit to toddmgreer/envoy that referenced this issue Jan 29, 2020
mattklein123 pushed a commit that referenced this issue Jan 29, 2020
Signed-off-by: Todd Greer <tgreer@google.com>
@mattklein123
Copy link
Member

We have the initial caching filter merged and a lot of follow up issues so I'm going to close this and we can track in the follow ups.

jpsim pushed a commit that referenced this issue Nov 28, 2022
Signed-off-by: Keith Smiley <keithbsmiley@gmail.com>
Signed-off-by: JP Simard <jp@jpsim.com>
jpsim pushed a commit that referenced this issue Nov 29, 2022
Signed-off-by: Keith Smiley <keithbsmiley@gmail.com>
Signed-off-by: JP Simard <jp@jpsim.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature requests. Not bugs or questions. help wanted Needs help!
Projects
None yet
Development

No branches or pull requests

8 participants