Microservices: REST vs Messaging

前端 未结 2 1899
滥情空心
滥情空心 2021-02-07 00:53

I heard Amazon uses HTTP for its microservice based architecture. An alternative is to use a messaging system like RabbitMQ or Solace systems. I personally have experience with

相关标签:
2条回答
  • 2021-02-07 01:00

    A standard that I've followed in the past is to use web services when the key requirement is speed (and data loss isn't critical) and messaging when the key requirement is reliability. Like you've said, if the receiving system is down, a message will sit on a queue until the system comes back up to process it. If it's a REST endpoint and it's down, requests will simply fail.

    0 讨论(0)
  • 2021-02-07 01:03

    REST API presumes use of HTTP only. it is quite stone age technology and does not accept async. messaging. To plugin messaging there, I would consider WebSockets Gateways -sorry for eventually dummy statements

    0 讨论(0)
提交回复
热议问题