Imported Google Group message. Original thread at: Redirecting to Google Groups Import Date: 2016-01-19 21:22:23 +0000. Sender:S. Alexander Zaman. Date:Tuesday, 1 September 2015 22:02:28 UTC+1.
What is the general architecture with tyk to handle failover of the api?
e.g., can if the api target fails (e.g., server is down), is there a way to set up a backup target to reach, or is that failover step at some other point where I should be setting this up?
Imported Google Group message. Sender:Martin Buhr. Date:Tuesday, 1 September 2015 22:15:51 UTC+1.
Hi Alex,
1.8 has quite a few features to help you manage failover:
Use the circuit breaker to detect failures and take a service offline until fixed (can kick off a web hook that reconfigures your Tyk config if you need to - maybe push a. Backup API definition into the cluster?)
Use the circuit breaker in conjunction with the service discovery module to dynamically set a failover when the breaker trips (integrates nicely with etcd, eureka or consul)
You can further minimise the failure rate if you have multiple upstream targets by using the round-robin load balancing feature
Use enforced timeouts, these also integrate with the SD feature
These are described best in the plugins section of the dashboard:
There’s also enforced timeouts, which can be handy if you don’t want something as complex as a CB.
Ultimately Tyk can handle pretty complex failover scenarios, how you handle the failover with Tyk is up to you, but there’s plenty of ways to handle it and we have some patterns in place to make it easier…