0

我正在实现微服务架构,在那里我学习了一个新主题“Transporter”,用于不同服务之间的通信。

但是我们也可以使用“axios”、“http-request”等包来构建请求调用。

那么,如果包含运输工具,它会有什么不同呢?以及传输代理调用与 http 请求调用有何不同?

4

1 回答 1

0

来自文档(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.

更一般的回应。请参阅 HTTP 与 NATS(可以是任何其他 pub/sub 协议)https://www.slideshare.net/Apcera/nats-vs-http

于 2022-03-03T20:03:18.030 回答