Open arkodg opened 3 weeks ago
would be great if this feature/filter can also support copying/setting fields from the body into the header, allowing routing based on request body which is a AI LLM Gateway use case, more in this doc cc @robscott
Although it is not encouraged that to mutate request body because it will need to buffer whole body and break the streamlined processing. But I also admit that there are lots of related requirements.
So, SGTM. And I can help to review the design and to sponsor this new extension if someone wants to take this. (note: a design proposal is necessary first).
@wbpcode I will take a shot at this!
/assign
Although it is not encouraged that to mutate request body because it will need to buffer whole body and break the streamlined processing. But I also admit that there are lots of related requirements.
So, SGTM. And I can help to review the design and to sponsor this new extension if someone wants to take this. (note: a design proposal is necessary first).
I think the technical challenge is to make mutations streaming. It's feasible as long as the body is structured. The buffering approach forces large connection buffers in multiplexed protocols, which is not scaleable for multi-tenant gateways.
Although it is not encouraged that to mutate request body because it will need to buffer whole body and break the streamlined processing. But I also admit that there are lots of related requirements.
So, SGTM. And I can help to review the design and to sponsor this new extension if someone wants to take this. (note: a design proposal is necessary first).
I think the technical challenge is to make mutations streaming. It's feasible as long as the body is structured. The buffering approach forces large connection buffers in multiplexed protocols, which is not scaleable for multi-tenant gateways.
According to my exp, in the scenarios where this feature is required, the body basically is a JSON. It's almost impossible to make mutations streaming for that.
At least for now, I don't know how to make a general solution for long live stream which has unlimited body length. So, I am inclined to ignore them first.
+1 to @wbpcode's suggestion of keeping streaming, out of scope
+1 to @wbpcode's suggestion of keeping streaming, out of scope
Yes, I didn't mean to require it. But we should be explicit about the limitations of a buffering approach (e.g. connection buffers must be at least the number of streams per connections \times max buffered bytes). E.g. 1MB JSONs with 100 H2 streams require up to 100MB connection buffers.
Title: Support Body Transformations
Description:. Envoy supports manipulating/transforming headers, would be great to also support transforming the request and response body to be able to
Relevant Links:
Adding a list of other proxy implementations that support this