Ext_proc: Enable sending body without waiting for header response in STREAMED mode (#35850)

---------

Signed-off-by: Yanjun Xiang <yanjunxiang@google.com>

Mirrored from https://github.com/envoyproxy/envoy @ 1a153166a6d1e9336ee8982d1a00ba98655c9d39
main
update-envoy[bot] 2 months ago
parent b912a71cc9
commit d896beead8
  1. 18
      envoy/extensions/filters/http/ext_proc/v3/ext_proc.proto
  2. 8
      envoy/service/ext_proc/v3/external_processor.proto

@ -271,18 +271,20 @@ message ExternalProcessor {
// The default value is 5000 milliseconds (5 seconds) if not specified.
google.protobuf.Duration deferred_close_timeout = 19;
// [#not-implemented-hide:]
// Send body to the side stream server once it arrives without waiting for the header response from that server.
// It only works for STREAMED body processing mode. For any other body processing modes, it is ignored.
//
// The server has two options upon receiving a header request:
// 1. Instant Response: Send the header response as soon as the header request is received.
// 2. Delayed Response: Wait for the body before sending any response.
// If the server chooses the second option, it has two further choices:
// 2.1 Separate Responses: Send the header response first, followed by separate body responses.
// 2.2 Combined Response: Include both the header response and the first chunk of the body response
// in a single body response message, followed by the remaining body responses.
//
// 1. Instant Response: send the header response as soon as the header request is received.
//
// 2. Delayed Response: wait for the body before sending any response.
//
// In all scenarios, the header-body ordering must always be maintained.
//
// If enabled Envoy will ignore the
// :ref:`mode_override <envoy_v3_api_field_service.ext_proc.v3.ProcessingResponse.mode_override>`
// value that the server sends in the header response. This is because Envoy may have already
// sent the body to the server, prior to processing the header response.
bool send_body_without_waiting_for_header_response = 21;
// When :ref:`allow_mode_override

@ -180,7 +180,10 @@ message ProcessingResponse {
// It is also ignored by Envoy when the ext_proc filter config
// :ref:`allow_mode_override
// <envoy_v3_api_field_extensions.filters.http.ext_proc.v3.ExternalProcessor.allow_mode_override>`
// is set to false.
// is set to false, or
// :ref:`send_body_without_waiting_for_header_response
// <envoy_v3_api_field_extensions.filters.http.ext_proc.v3.ExternalProcessor.send_body_without_waiting_for_header_response>`
// is set to true.
envoy.extensions.filters.http.ext_proc.v3.ProcessingMode mode_override = 9;
// When ext_proc server receives a request message, in case it needs more
@ -285,9 +288,6 @@ message CommonResponse {
// Instructions on how to manipulate the headers. When responding to an
// HttpBody request, header mutations will only take effect if
// the current processing mode for the body is BUFFERED.
// [#comment:TODO(yanjunxiang-google) rephrase last sentence once send_body_without_waiting_for_header_response is not hidden:
// the current processing mode for the body is: 1) BUFFERED; 2) or STREAMED and
// the :ref:`send_body_without_waiting_for_header_response <envoy_v3_api_field_extensions.filters.http.ext_proc.v3.ExternalProcessor.send_body_without_waiting_for_header_response>` is enabled.]
HeaderMutation header_mutation = 2;
// Replace the body of the last message sent to the remote server on this

Loading…
Cancel
Save