Dynamic service discovery

hi all,

I’m currently running a typical stack (on AWS) with Prometheus collecting metrics and Consul knowing where service endpoints are to be found. Looking at render, I’m now puzzling with the following:
I want more metrics exposed from my private API services, which I’ll pick up with a Prometheus instance hosted on Render (while I wait for Render to maybe introduce a managed one somewhere down the line). Now, in my AWS stack I use Consul to dynamically gain information about service endpoints. What do I use on Render? Which API can I query to get a list of registered services and their names, so I can instruct Prometheus to scrape name:10000.

Looking for advice, thanks.

1 Like

Hi @harmw,

Great question. With Render, dynamic service discovery is no longer necessary. As you alluded to, all Render web services and private services are reachable within a private network at a fixed host:port address. Unless you change the port that your service is listening on, this address won’t charge. These internal service addresses are displayed in the Render dashboard after a service is deployed for the first time.

With our infrastructure as code offering you can define multiple services in a single render.yaml file and add an environment variable on one service that gets dynamically assigned the internal address for another service (see YAML Specification | Render · Cloud Hosting for Developers). Our forthcoming public API will give programmatic access to these internal addresses, but for most use cases it’s sufficient to use infrastructure as code, or even just to hardcode internal service addresses where needed.

I hope this helps. Let us know if you have follow-up questions!

1 Like

makes sense, think I’m still mentally adjusting from DiY paradigms around running my own services stack :joy:

1 Like