0

I do have multitenant service. Each tenant can be served by one of the specific machines in the cluster. There is a also a service which knows where the specific tenant is loaded now.

Can I configure envoyproxy as a gateway, in a way it will route requests to the specific machine where tenant is loaded? Tenant id is in the URL.

So what I want is to configure envoy in way it asks another service where to route the request?

pastorgluk
  • 191
  • 1
  • 1
  • 7

1 Answers1

0

Did you ever figure out a workable solution?

I've been looking for a solution to a similar problem. I was looking at the Route Discovery Service (RDS), but it seems to be for routing to different clusters, rather than instances within a cluster.

We have traffic spread across many Kafka topic partitions, and want to route inbound HTTP requests to the instance currently handling each partition without exposing the partition identifier to the HTTP clients.

  • Following up on this, for the Kafka use case we decided to use a Lua filter to map the partition key to a partition number using the same hash as Kafka, and then using Envoy's ring balancer to assign partitions to hosts. Each host will automatically handle whichever partitions are routed to it. In a stable system, each partition is handled by a single host, and during times of host failure / elasticity there is a short period of time during which some partitions are handled by more than one hosts. – Wayne Feick Jun 19 '19 at 15:27
  • We still do have the problem of partition specific state residing on exactly one host, and wanting to have Envoy route requests to the appropriate host based on partition key. I haven't figured out a good way to do that yet. – Wayne Feick Jun 19 '19 at 15:29