Recently, several popular service search tools have become popular / "mainstream", and Im wonders when to use them for the first time instead of traditional load balancers.
With LB, you cluster the node node behind the balancer, and then clients make requests to the balancer, who then (usually) bypasses all requests on all nodes of the cluster.
With the discovery of the service ( Consul , ZK , etc.), you allow the centralized "consensus" service to determine which nodes for a particular service are healthy, and your application connects to nodes that the service considers healthy. Thus, while service discovery and load balancing are two separate concepts, service discovery gives you load balancing as a convenient side effect.
But, if the load balancer (say HAProxy or nginx ) has built-in monitoring and health checks in it, then to a large extent you get service detection as a side effect of load balancing! If my LB does not want to forward the request to an unhealthy node in its cluster, then this is functionally equivalent to the consensus server telling my application to not connect to the disappointing node.
Thus, service discovery tools look like 6-in-one, half-dozen in the other, equivalent to load balancers. Am I missing something? If someone had an application architecture based entirely on load-balanced microservices, what is the advantage (or not) of switching to a service-based discovery model?
smeeb source share