Failover target url


#1

Imported Google Group message. Original thread at: https://groups.google.com/forum/#!topic/tyk-community-support/edrjEo6e7Aw 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?

Best,
Alex


#2

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:

https://tyk.io/dashboard-v0-9/plugins/circuit-breaker/

And raw Tyk config here in the API management section:

https://tyk.io/v1.8/api-management/circuit-breakers/

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…

Hope that answers things :slight_smile:

Cheers,
Martin


From: S. Alexander Zaman [email protected]
Sent: Tuesday, September 1, 2015 22:02
Subject: failover target url
To: Tyk Community Support [email protected]
Cc: [email protected]

  • show quoted text -


You received this message because you are subscribed to the Google Groups “Tyk Community Support” group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion on the web, visit https://groups.google.com/d/msgid/tyk-community-support/629f4aee-0ab1-4237-bc65-7ca9b524674d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


#3

Imported Google Group message.
Sender:S. Alexander Zaman.
Date:Wednesday, 2 September 2015 00:12:36 UTC+1.

Wow I did not see this whole plugins section before, Martin. I’ll have to look into these further. Thanks.

By the way, has tyk 1.8 rolled out the docker yet if I do a docker pull?

S


#4

Imported Google Group message.
Sender:Martin Buhr.
Date:Wednesday, 2 September 2015 06:13:30 UTC+1.

Yep all images are up to date.

Cheers,
Martin

  • show quoted text -

  • show quoted text -


You received this message because you are subscribed to the Google Groups “Tyk Community Support” group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion on the web, visit https://groups.google.com/d/msgid/tyk-community-support/8b36e52f-b267-452d-91ea-eefd0f47ea33%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


#5

does loadbalancing also act as failover?

edit: i guess not tested it with 1 unavailable server and 1 up and running server, 50% of the calls on-and-off got errors, and the other half worked.


#6

You can use the load balancer in conjunction with the uptime tests to have tyk take a server out of circulation if it starts to fail.