We setup a k8 cluster for our microservice product together with consul.
One of our services is a self-written message bus which supports clusterization. Therefor, every spawned instance needs to connect to all other alive instances (static tcp connection).
We want to be able to scale this service up and down quite heavily at any given time.
Is it best practice to request all alive services of the catalog via rest (…/catalog/services), loop through the restult, exclude ourselfs and connect to each server?
What about new/dropped servers? Is polling for available servers the only/best option?
Can connect help us here?