How are Moleculer transporters are different from http request calls?

288 Views Asked by At

I am implementing microservices architecture, there I learned a new topic "Transporter" which is used for the communication between different services.

But the same thing we can also build with request calls using packages like "axios", "http-request" etc.

So with inclusion of transporters what difference will it make? And how transporter broker call is different from http request call?

1

There are 1 best solutions below

0
André Mazayev On

From the docs (https://moleculer.services/docs/0.14/networking.html#Transporters)

Transporter is an important module if you are running services on multiple nodes. Transporter communicates with other nodes. It transfers events, calls requests and processes responses …etc. If multiple instances of a service are running on different nodes then the requests will be load-balanced among them.

More general response. See HTTP vs NATS (could be any other pub/sub protocol) https://www.slideshare.net/Apcera/nats-vs-http