Use ZK for service discovery

In the docs, it looks like you can use Consul, etcd, or Eureka for service discovery. Is this capability pluggable? For example, if we have service registration information directly in zookeeper, is there a way to make it available to Tyk?

Thanks!

1 Like

Hi George,

I believe you should be able to use ZooKeeper if you tick the Service Discovery option in the API definition and enter details such as the Query Endpoint and the Target Endpoint. I noticed you mentioned that you’d read through our docs - did you also look through the instructions on this page? If so, did you encounter any problems when attempting to add your configuration settings?

Kind regards,
Jess @ Tyk

I saw that page, but it only mentioned the following:

Query endpoint: The endpoint to call, this would probably be your Consul, etcd or Eureka K/V store.

To use Zookeeper, would we need to make a REST endpoint that can get the members?

Hi George,

We believe that you should be able to use this if you configure a RESTful endpoint in ZooKeeper. However, as neither I nor my colleagues have come across any users who have attempted to setup Tyk with ZooKeeper in the past, we can’t really say for sure, unfortunately. Could you please give that a try and then let us know how you get on?

Many thanks,
Jess @ Tyk

Hello!

The basic idea behind service discovery is quite simple: Tyk can works with any service discovery mechanism if it provides JSON output. In Tyk configuration file you just provide JSON paths to needed values. Zookeper, like most of similar systems basically is key/value storage. And if you can store JSON there, Tyk will support it. Just configure proper JSON paths according to documentation.

If you already have example JSON record which you use for service discovery, you can put it here, and we try to help with Tyk configuration.

Hope it make sense!

Leonid, Tyk Team

1 Like