Service discovery
In the current context of sharing APIs, it’s easy to think of service discovery as a developer finding an API service to use. For this chapter, that is more of a downstream event (pun intended) of service publishing. Instead, we are going to focus on service discovery in the context of seeking out available and healthy endpoints for our API.
When achieving the levels of scalability that event-driven architecture offers, we, of course, have many instances of our services running across the unpredictable landscape of the cloud. So, when we make one of our APIs available as a single unified service, it is almost a certainty that this is backed with multiple instances of the same runtime across almost any combination of infrastructure configurations. How do we make sure that requests to our API are directed to a healthy service instance?
It’s not quite load balancing…
This might appear like a job for a load balancer. However, load balancers...