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

Does envoy or envoy wasm c++ sdk support caching of http request and response body #118

Open
CalbeeMing0530 opened this issue Jun 9, 2021 · 1 comment

Comments

@CalbeeMing0530
Copy link

CalbeeMing0530 commented Jun 9, 2021

I deployed Envoy wasm plugin in Istio environment,  and use wasm c++ sdk to operate on http requests,I found that the current onRequestBody method does not seem to have a cache operation for the request body, what I want is to have this cache operation so that the request or response body can be accumulated to a certain size before being detected and processed.for example, I can set a buffer size of 10K, only when the request payload accumulated to 10K can trigger the processing logic.
Is there any consideration for this in the future ? or Envoy already has this configuration, looking forward to your reply.
Also,Does wasm currently support breakpoint debugging inside the envoy wasm sandbox using a gdb-like approach?

@coolg92003
Copy link

I think you can define a 10K buffer in stream context, if the bodysize >0, then cache it by each call onReq/RespBody.
The only I worried whether it can definitively call onReq/RespBody() once it is endStream

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

No branches or pull requests

2 participants