T
T
t800zippygod2020-08-29 03:04:28
JavaScript
t800zippygod, 2020-08-29 03:04:28

Microservices in server development?

Good time of the day everyone.
Please advise on the use of microservices in the project. Specific implementation, if any, then on NodeJS / rabbitMQ

According to the information that I read, microservices are good for increasing the level of abstraction and separating application logic. Moreover, in all examples they were raised on the same computer as the main server, but on a different port.
I am also interested in the issue of using microservices in terms of improving performance. The division of computations into several communicating machines.
1) Is it possible to implement microservices as communicating servers located on different machines? It is clear that in any case this can be implemented with regular http requests. But mb in the design of microservices has its own features
2) If you connect a microservice on the same computer, but from a different port, will a separate process be allocated for it by the operating system? That is, in this way it is possible to perform parallel computing on a machine?
3) Who is familiar with the implementation of microservices in NodeJS, tell me good resources or books please.
4) Who knows some fundamental literature on the topic of building complex loaded servers - please write, I will read it with pleasure

Answer the question

In order to leave comments, you need to log in

1 answer(s)
0
0nkery, 2020-08-31
@t800zippygod

1. Yes, through the same RabbitMQ you can organize the communication of your microservices. RabbitMQ will be especially useful if you can avoid a large number of direct requests to individual microservices, and you can represent data flows in the form of events and their handlers.
2. Yes, it will be launched in a separate process. This can be called parallel computing. :) Well, in general, in Linux, the difference between a separate system process and a separate thread (thread) inside one system process is blurred (they actually differ only in the creation parameters - whether there is a shared memory with some other threads of execution).
3. Unfamiliar, but I know that many companies run away from the node, because there is not enough performance or a confusing execution model.
In general, if you're worried about performance, try something faster than a node: Erlang/Elixir, Go, .NET, and so on.
Also, try to write a monolithic prototype first, and dance from it in building microservices - this way you can clearly understand your subject area, the data in it and operations on them. And microservices are more of a means of separating responsibility in large teams than a way to increase productivity. In most cases, I think that the performance of such microservices only drops.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question