Skip to content

router shadow broken for http/2 data frame with end_stream = true #5646

@allencwl

Description

@allencwl

Title: Shadow traffic does not support http2?

Description:
hello,
I want to use shadow traffic to proxy HTTP2,but I find it failt to work.
This is my case.
Configuration:

  {
   "listeners":[
      {
         "address":"tcp://0.0.0.0:80",
         "filters":[
            {
               "type":"read",
               "name":"http_connection_manager",
               "config":{
                  "codec_type":"auto",
                  "stat_prefix":"ingress_http",
                  "use_remote_address":true,
                  "idle_timeout_s": 10,
                  "tracing":{
                     "operation_name":"egress"
                  },
                  "route_config":
		  {
                    "virtual_hosts":
                     [
                       {
                           "name" : "backend",
                           "domains" : ["*"],
                           "routes" : [
                               { 
                                 "prefix" : "/",
                                 "cluster": "grpc_cluster",
                                 "hash_policy": {
                                   "header_name": "x-forwarded-for"
                                 },
				 "shadow": {
                                    "cluster": "grpc_cluster_shadow"
				 }
                               }
                           ]
                        } 
                      ]
                   },
                  "filters":[
                     {
                        "type":"both",
                        "name":"health_check",
                        "config":{
                           "pass_through_mode":false,
                           "endpoint":"/healthcheck"
                        }
                     },
                     {
                        "type":"decoder",
                        "name":"router",
                        "config":{

                        }
                     }
                  ],
                  "access_log":[
                     {
                        "path":"/dev/stdout"
                     }
                  ]
               }
            }
         ]
      }
   ],
   "admin":{
      "access_log_path":"./envoy_admin.log",
      "address":"tcp://0.0.0.0:8080"
   },
   "cluster_manager":{
      "clusters":[
         {
            "name":"rds_cluster",
            "type":"strict_dns",
            "connect_timeout_ms":2500,
            "lb_type":"round_robin",
            "hosts":[
               {
                  "url":"tcp://eds.envoy.xlsoa:1949"
               }
            ]
         },
         {
            "name":"grpc_cluster",
            "type":"static",
            "connect_timeout_ms":2500,
            "lb_type":"ring_hash",
	    "features" : "http2",
            "ring_hash_lb_config": {
              "minimum_ring_size": 1024,
              "use_std_hash": false
            }, 
            "hosts":[{"url":"tcp://10.10.62.120:50051"}]
         },
         {
            "name":"grpc_cluster_shadow",
            "type":"static",
            "connect_timeout_ms":2500,
            "lb_type":"ring_hash",
	    "features" : "http2",
            "ring_hash_lb_config": {
              "minimum_ring_size": 1024,
              "use_std_hash": false
            }, 
            "hosts":[{"url":"tcp://10.10.62.121:50051"}]
         }
      ],
      "sds":{
         "cluster":{
            "name":"sds_cluster",
            "type":"strict_dns",
            "connect_timeout_ms":3000,
            "lb_type":"round_robin",
            "hosts":[
               {
                  "url":"tcp://eds.envoy.xlsoa:1949"
               }
            ]
         },
         "refresh_delay_ms":30000
      },
      "cds":{
         "cluster":{
            "name":"cds_cluster",
            "type":"strict_dns",
            "connect_timeout_ms":3000,
            "lb_type":"round_robin",
            "hosts":[
               {
                  "url":"tcp://eds.envoy.xlsoa:1949"
               }
            ]
         },
         "refresh_delay_ms":30000
      }
   }
}

As a result, only 10.10.62.120 nodes can receive traffic, and 10.10.62.121 nodes can not receive traffic.
What's wrong?
thx

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions