iT邦幫忙

第 12 屆 iThome 鐵人賽

DAY 9
0
Software Development

Microservices in Action: with example in Node.js系列 第 9

通訊模式 1:1 vs 1:N - Microservices in Action: with example in Node.js

微服務之間的通訊模式和反向模式

圖片來源:微服務架構中的通訊 by Microsoft

  • 一對一
  • 一對多: 每個要求可以由零到多個接收者來處理。其中的範例是用於事件驅動架構這類模式的 Pub/Sub 機制。

注意事項

  • 盡可能不要仰賴多個微服務之間的同步通訊 (要求/回應),甚至連查詢也不要仰賴於此。
  • 如果微服務 (例如查詢要求) 之間的同步相依性越高,用戶端應用程式的整體回應時間就會越糟。

資料來源:


上一篇
通訊模式 sync vs async
下一篇
共用模組化
系列文
Microservices in Action: with example in Node.js24
圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友留言

立即登入留言