Closed DanielFroehlich closed 5 years ago
Option F: Pub/Sub - Service sends a query message to a Topic that backends listen to - they respond within a time window to be known. Similar to Option D) but less Risk of stale data in dev phase.
Let's got with simple Option A for the basic stuff., and maybe later added a more sophisticated stuff like Option D
How does a frontend service find out which backend services exist and which endpoints they have?
Example: How does the EventService find out, which musicproviders are avail? Could be backend-spotify, backend-soundclound, backend-itunes, or non of these.
Ideas:
Have a topic where each service provider publishes an event with his name, endpoint urls (internal as xxx.svc.local and external via ocp router), versions etc..
The event is published every time a pod is started or every 12 hours. Thus consumers can read the topic -12 hours and know who might be there. To get final confidence, consumer can call the /health endpoint to verify - et voilá.