> For the complete documentation index, see [llms.txt](https://amartyushov.gitbook.io/tech/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://amartyushov.gitbook.io/tech/app-aspects/software-architecture/communication/rest-vs-messaging.md).

# REST vs messaging

[Lesson 137](https://developertoarchitect.com/lessons/lesson137.html)

| REST                                                                                   | Messaging                        |              |
| -------------------------------------------------------------------------------------- | -------------------------------- | ------------ |
| <ul><li>Guarantee that if request is processed than all good (e.g. payment) </li></ul> | <ul><li>Responsiveness</li></ul> | :thumbsup:   |
| <ul><li>If call to second service fails => the whole request fails</li></ul>           |                                  | :thumbsdown: |

![](https://415484505-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LxtoAXZwwOc4XGto8vb%2Fuploads%2FPFMlwmEr8ZLKPg4CJC3R%2FScreenshot%202022-05-02%20at%2009.20.57.png?alt=media\&token=ffc183e1-e201-4c16-a691-6ebea79ce840)

* use REST for external communication
* use messaging for internal communication
