B
B
beduin012021-12-07 12:44:26
Domain Name System
beduin01, 2021-12-07 12:44:26

How to address microservices by name? Need a DNS?

A question. There are microservices. I would like to be able to access them from localhost by name, and not by IP. I suspect that DNS is needed, but maybe there is something simpler? To simply drive in instead of:
127.0.0.1:5001 serviceName and its page with metrics would immediately open in the browser.

Is there a solution besides editing hosts ? So that in case of changing the IP of the server there was no need to climb there

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
Roman Mirilaczvili, 2021-12-07
@beduin01

Try an external DNS resolver https://nip.io/
Then you will not need to register anything anywhere, but only access the service at an address like
serviceName.127.0.0.1.nip.io:5001
But without access to the Internet, it will not work.

R
Ruslan Fedoseev, 2021-12-07
@martin74ua

https://www.consul.io/ ?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question