Currently there are two ways to register consul watches https://www.consul.io/docs/dynamic-app-config/watches:
via consul watch command
via json file with subsequent consul reload
We ate trying to use consul as ‘dns’ for cluster services. We register service watches to get notification event from consul when particular service is added or deleted to the pool.
we could not use ‘consul watch’ command because it’s locking, but we use json file approach. The issue is ‘consul reload’ command is very expensive ( take tens of seconds) and time is growing fast when number of services pass few thousands…
Did anyone knows if there is a way to register/de-register watches dynamically via http api ?