Using different Target URLs on different tyk nodes

We’re running multiple tyk nodes, using DB configurations. We’re transition our backend from one docker orchestration tool to another, and we’re trying to do the transition gradually, moving traffic gradually from one cluster to another.

The issue we have is that the Target URL is different on the new cluster than the old (because we’re moving to a different service discovery mechanism, the DNS names of the backend services are changing).

Everything else about the API definition is the same, it’s just that some tyk nodes should use the old target URLs, and some should use the new.

I’m struggling to find a way to support this in tyk. I was hoping I could use the uptime checks and load balancing feature: all tyk nodes know about both upstream Target URLs, but each node would only send to the upstream URL that was visible to it. But I don’t think that will work, since it looks like a) only one tyk node will do the health checks, and b) the result of the health check is shared across all the nodes.

My other thought was to define multiple copies of the API definitions, one for each upstream, then use the tags and API sharding to ensure each node only loads the version of the API has the upstream target visible to it. I’m hoping tykdash will allow this, since the API versions will have overlapping listen paths. This also complicates the scripts we use to manage policies, since I gather each policy will need to grant access to all possible variants of an API.

Are there other approaches to this problem I can try? Thanks.

I think using the tagging would be the way to go. Also, if the listen paths are a problem, then bind them to the hostname of the box or the load balancer serving them traffic, Tyk won’t complain if the domains are different.