M
M
MiyRon2021-09-09 12:54:47
Service Oriented Architecture
MiyRon, 2021-09-09 12:54:47

How to properly track the life of a microservice?

Good day gentlemen and ladies!

I am new to microservices and so I apologize in advance for my ignorance.
As I understand it, a microservice is an application that is responsible for one of the business tasks. I am developing several microservices in php. I also have two nginx and php-fpm containers to run my php application. It turns out that one microservice requires several processes, but when I started to implement a registry of microservices , a problem arose.

When conditionally microservice_1 makes a request to the registry "I'm alive buddy!", the registry writes the ip of the php-fpm container, not nginx. Therefore, in the registry, we see the ip not of the nginx microservice, but of itsphp-fpm . There was an idea to shove both php-fpm and nginx into one container, which is bad practice.

Question How to make the microservice specify the ip of its nginx, not php-fpm, when registering? Because the entry point is nginx. Or perhaps there are other ways to implement a microservices registry in docker.

Thank you !

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry, 2021-09-09
@q2digger

Discover, Register and Resolve services for application...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question