Service Discovery and retries


#1

Hi,

My API is configured to use Service Discovery. I tried to simulate the situation where one service is DOWN while the SD result is cached. Unfortunately, it looks like the server which is DOWN is still used as upstream and that tyk does not retry with an other service if it cannot connect to the first one :frowning:

So, as a consequence, all my incoming API requests do fail until the cache times out.

Are there any workaround ?

Thanks,
Thomas


#2

In order to check for DOWN/UP events you need to configured uptime tests, see here https://tyk.io/docs/ensure-high-availability/uptime-tests/#a-name-load-balancing-and-service-discovery-a-load-balancing-and-service-discovery


#3

Thanks leon.
But if the elected upstream is DOWN (crashed between two health checks), Tyk will not retry with the next possible target? That’s what I’m observing now…


#4

Additionally, I do not see any guidance in the documentation about how to integrate those uptimes with consul :/, or with any other SD either.


#5

Ensure that you have this options turned on: