Support thrift Header payload passthrough (#18296)

Framed was the only transport that supported payload passthrough. However the payload
of Header transport is the same as Framed. Therefore its possible to also use payload
passthrough with Header to Header, Framed to Header and Header to Framed. Therefore
allow those extra three combinations and add integration tests. Note that in future if Header
transforms become supported then passthroughData will need to undo any transforms.

New metrics request_passthrough and response_passthrough are added to show when payload
passthrough occurs. Note that previously response_success was always incremented when
performing payload passthrough, and that is corrected to only occur when parsing the
payload.

This will enable payload passthrough for combinations of downstream/upstream transports that did not
previously perform passthrough. If a private filter does not implement passthroughEnabled or passthroughData
correctly, has enabled payload passthrough and is using Header to Header, Framed to Header or Header to Framed
then the filter may have issues.
Risk Level: Medium
Testing: Extended existing integration tests and verified on local deployment.
Docs Changes: Updated ThriftProxy proto docs.
Release Notes: Minor behavior change.
Platform Specific Features: N/A

Signed-off-by: James Fish <jfish@pinterest.com>

Mirrored from https://github.com/envoyproxy/envoy @ 0f31648808783b1057c78ff0c90721b81d32e19c
pull/624/head
data-plane-api(Azure Pipelines) 3 years ago
parent db29a1c642
commit 24c2d561db
  1. 4
      envoy/extensions/filters/network/thrift_proxy/v3/thrift_proxy.proto

@ -85,8 +85,8 @@ message ThriftProxy {
repeated ThriftFilter thrift_filters = 5;
// If set to true, Envoy will try to skip decode data after metadata in the Thrift message.
// This mode will only work if the upstream and downstream protocols are the same and the transport
// is the same, the transport type is framed and the protocol is not Twitter. Otherwise Envoy will
// This mode will only work if the upstream and downstream protocols are the same and the transports
// are Framed or Header, and the protocol is not Twitter. Otherwise Envoy will
// fallback to decode the data.
bool payload_passthrough = 6;

Loading…
Cancel
Save