Skip to content

thrift-proxy: add support for cluster header based routing #8991

@rgs1

Description

@rgs1

When using the thrift proxy, we risk having very long route tables, e.g.:

               "routes": [
                  {
                    "match": {
                      "headers": [
                        {
                          "exact_match": "foo",
                          "name": "x-mesh-cluster"
                        }
                      ],
                      "service_name": "FooService"
                    },
                    "route": {
                      "cluster": "foo_cluster",
                      "strip_service_name": true
                    }
                  },
                  {
                    "match": {
                      "headers": [
                        {
                          "exact_match": "bar",
                          "name": "x-mesh-cluster"
                        }
                      ],
                      "service_name": "BarService"
                    },
                    "route": {
                      "cluster": "bar_cluster",
                      "strip_service_name": true
                    }
                  },
....

We can simplify and collapse this by supporting cluster_header — like in the HCM — to determine the cluster to route to:

https://github.com/envoyproxy/envoy/blob/master/api/envoy/api/v2/route/route.proto#L676

@fishcakez @zuercher sounds reasonable?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementFeature requests. Not bugs or questions.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions