proxy-wasm-cpp-sdk icon indicating copy to clipboard operation
proxy-wasm-cpp-sdk copied to clipboard

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

Open CalbeeMing0530 opened this issue 4 years ago • 1 comments

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?

CalbeeMing0530 avatar Jun 09 '21 01:06 CalbeeMing0530

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

coolg92003 avatar Dec 05 '22 03:12 coolg92003