4 ms·
So how does service discovery work? Where do I read more?
by tokenizerrr 10y ago
So how does service discovery work? Where do I read more?
- talideon 10y agoThat's really an orthogonal concern. You could use Consul, DNS, &c. to do that.
- spullara 10y agoIt isn't really that orthogonal. Just like authentication, things like service discovery, smart clients (with load balancing, retries, etc) should likely be pluggable with some reasonable defaults, otherwise you will be building your own custom stuff on top of it and lose a lot of the value of having a standard. See Finagle for a more complete RPC framework.
- zellyn 10y agoI can speak most directly to Go, where I've been working. You could potentially use one of the maps-to-DNS service discovery systems, although that's limited. At Square, we created a custom balancer (https://godoc.org/google.golang.org/grpc#Balancer https://godoc.org/google.golang.org/grpc#Balancer) which not only handles updates from the service discovery system in order to manage the pool of connections, but also handles which connection to use per-call (so we can do targeting of specific capabilities, datacenters, etc.)