Microservices: REST vs Messaging

前端 未结 2 1895
滥情空心
滥情空心 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.

提交回复
热议问题