how to use envoy to do custom routing for this scenario

113 views
Skip to first unread message

caoshe...@gmail.com

unread,
Oct 31, 2017, 9:39:56 AM10/31/17
to envoy-users
I'm starting to evaluate envoy to build our company's microservices. Our product is SAAS platform. Each customer is a separate organization and each organization's data belong to different dataCenter( logical dataCenter).  The reason is that Europe customer wants to keep their data in Europe instead of US.

For example 

Customer   OrganizationId  DataCenter

customer1     1                  US
customer2     2                  CA
customer3     3                  EU


We are trying to build microservices to manage the data in each DataCenter. Our current thought is to deploy a cluster of the microservices in each dataCenter, so the service node is close to the data.

In production, we have more than 20k customers ( organizations) and 3 dataCenters.  The microservice client can only provide organizationId when it calls the microservices. How should I use envoy custom RDS to for this scenario?

One solution I can think of is we will provide the full organizatioId <-> DataCenter mapping in the RDS api (GET /v1/routes/(string: route_config_name)/(string: service_cluster)/(string: service_node)), but the downside of this approach is that the mapping will pretty long because we have more than 20k customers (organizations)

My question is will this be a problem for envoy and is there any other option?

Matt Klein

unread,
Oct 31, 2017, 6:54:39 PM10/31/17
to Tim Xi, envoy-users
One option would be to provide the organization ID in a header and use a header for routing (see docs on how to route with a header). Then you could provide "serviceA_1", "serviceA_2", etc.

--
You received this message because you are subscribed to the Google Groups "envoy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to envoy-users+unsubscribe@googlegroups.com.
To post to this group, send email to envoy...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/envoy-users/234fd5be-deaa-48fe-bd84-a96492919296%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Reply all
Reply to author
Forward
0 new messages