Answer the question
In order to leave comments, you need to log in
How to understand microservices?
Now the task is to rewrite the project. There are many different services and APIs with which the application must communicate, it was decided to check the possibility, switch to a micro-service architecture (micro-monoliths are even more suitable for us). But there are misunderstandings:
1. If each service has its own api, why API Gateway (entry point), is it possible to make a call to the required api on nginx by location?
2. Should I use RabbitMQ to communicate between services? Do I understand correctly that the entry point on the node sends a request to the rabbit and waits for a response from it and gives it to the client?
3. For example, we are doing a microservice for user authorization and registration. Should he have his own database? How, for example, in the admin panel to contact users to add or block them, should I request users from the microservice? It turns out the microservice is responsible for users CRUD + Registration, authorization, password reset?
Answer the question
In order to leave comments, you need to log in
How to understand microservices?
Microservices are not written just to redesign APIs.
The main point of microservices is to isolate components from your product that are heavily loaded so that these components can be easily scaled horizontally.
And from this point of view:
1. If each service has its own api, why API Gateway (entry point), can nginx make a request by location to the desired api?
2. Should I use RabbitMQ to communicate between services? Do I understand correctly that the entry point on the node sends a request to the rabbit and waits for a response from it and gives it to the client?
3. For example, we are doing a microservice for user authorization and registration. Should he have his own database? How, for example, in the admin panel to contact users to add or block them, should I request users from the microservice? It turns out the microservice is responsible for users CRUD + Registration, authorization, password reset?
Good afternoon!
First of all, answer one question - what kind of problem do you want to solve by switching to a microservice architecture. Note that providing ACID in a microservice framework is more difficult than in monoliths. Also maintaining microservices is also more difficult. If there is a load on the service, then it is not a fact that you need microservices. It is possible that you need service optimization or more productive hardware.
If each service has its own api, why API Gateway (entry point), can nginx make a request by location to the desired api?
Should I use RabbitMQ to communicate between services? Do I understand correctly that the entry point on the node sends a request to the rabbit and waits for a response from it and gives it to the client?
For example, we are doing a microservice for user authorization and registration. Should he have his own database?
It turns out the microservice is responsible for users CRUD + Registration, authorization, password reset?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question