Built-In Service Discovery / Ingress #1872
-
Hi everyone. It would be great if yarp would provide some built-in Service Discovery mechanisms without the need of relying on K8S, Consul, Eureka etc. Maybe Service Discovery is not really the right term. What I'm rather thinking is a simplified version of the Tunneling feature discussed here. The usecase is like: I am providing my applications a configuration containing:
Whenever an application is started in a dynamic scaling environment (no matter whether K8S, custom orchestration like manual installation, Ansible, Azure App Services) it will connect to YARP and register itself in the cluster and perform a regular health-check & keep-alive. At this point everything is as usual: YARP will look in the list of destinations which were dynamically registered through the process above. Has this been discussed within the YARP community already? I was thinking that with a custom API (or maybe websocket channel) I guess I could handle this also as a custom YARP extension but something more common/standardized/built-in is always preferrable 😁 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 8 replies
-
Self-registering destinations hasn't come up. This could be done as an implementation of IProxyConfigProvider that was updated from a listening endpoint. The protocol doesn't matter (HTTP/REST, WS, etc.). You're right to call out that this endpoint would have to be secured. The biggest downside is that it also requires a client on each node being proxied to, written in the language of that client (Java, node, .Net, etc). For that reason you'd want to keep the interaction as simple as possible, likely some REST HTTP calls. That's one reason it's generally preferable to rely on an orchestrator for the discovery. Another is that you'd need a garbage collection mechanic for destinations that go offline for too long and can't self-unregister. |
Beta Was this translation helpful? Give feedback.
Self-registering destinations hasn't come up. This could be done as an implementation of IProxyConfigProvider that was updated from a listening endpoint. The protocol doesn't matter (HTTP/REST, WS, etc.). You're right to call out that this endpoint would have to be secured.
The biggest downside is that it also requires a client on each node being proxied to, written in the language of that client (Java, node, .Net, etc). For that reason you'd want to keep the interaction as simple as possible, likely some REST HTTP calls. That's one reason it's generally preferable to rely on an orchestrator for the discovery. Another is that you'd need a garbage collection mechanic for destinations that …