You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When we started the codebase we adhered to how go micro encapsulated a service registry because we thougth we would need that. As it turns out, we don't. We can rely on dns to be our service registry:
bare metal we can use localhost:port
in docker we can use container:port and docker will route the requests
in kubernetes we can use `service.namespace(.srv.cluster.local):port´ and kubernetes will route our requests. with grpc the native go client can even use a headless service and handle connection failures and retries natively
We should remove any service registry related code and stick to urls. the grpc client can then handle unix:// dns:// or kubernetes:// prefixes. for kubernetes we alredy integrate with the kubernetes control plane to pick up new pods when scaling up.
We still need to retry requests when scaling down.
Using dns as our service registry would significantly reduce the complexity:
we can delete the nats-js-kv registry obsolete
reva services don't have to manually be registered
requests can be made without implementin our own service lookup code with go micro selectors etc
drop dozens of env vars
less dependency on go micro
The latter will unify how reva and opencloud make http and grpc requests.
We can already prevent nats from being used by using dns:// urls in the endpoints. I tested this and there are a few points where service names have been hardcoded: requests to the settings service and search IIRC. They will need to be made configurable, but IMO it is already a bug that they cannot be configured.
Reacted by Michael Barz, Jin Yao, suse-coder and Mayurifag
Reacted by Michael Barz, Willy Kloucek, Jin Yao and Mayurifag
Activity