Hacker News new | ask | show | jobs
by tokenizerrr 3587 days ago
So how does service discovery work? Where do I read more?
2 comments

That's really an orthogonal concern. You could use Consul, DNS, &c. to do that.
It 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.
I 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) 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.)