When designing Service Oriented Architectures, which one do you use - HTTP or AMQP?


Write your response…

This answer has received 1 appreciation.

If you're building for large intranets and have close communication with developing parties on both sides, I'm sure AMQP is a great protocol/standard to use. If you're building for the web/cloud, it seems to me you're better of with the standard that is already in use, adopted and useable without extra effort on standard hardware: HTTP/REST

For anything external-facing that people integrate into, sure, HTTP makes sense, but that doesn't stop you from using AMQP (or both) as I've seen some companies does.

If you replace the HTTP endpoint with an AMQP endpoint, you get everything you'd get with HTTP minus the unreliability of HTTP. The message you POSTed to your HTTP endpoint, you now simply publish to the AMQP endpoint.

With HTTP there IS extra effort you need to do, service discovery, overload protection, retry-if-fail in certain cases, load-balancing, etc whereas AMQP gives you all of the out of the box with much better throughput.

Write a reply...

AMQP is a great messaging protocol. Messaging is an important part of what the web is about. HTTP is more widely used however. And there are few more messaging protocols each with their own benefits.

I can imagine exposing the system through AMQP partely provided using a HTTP/rEST, HTTP/jsonrpc2, HTTP/soap gateway. I can also imagine HTTP being used for some parts of the system (think microservices architecture where subsystems are partly exposed using HTTP) while all those subsystems are interconnected using AMQP, and to which you maybe also offer access. Depending on the messaging needs.

Yes! AMQP is great for interconnecting internal components and it's damn fast! For external APIs (JSON / SOAP), i simply add an HTTP endpoint on the frontend that's connected to the rest of the system via AMQP. This kind of setup is very easy to scale!

Write a reply...

Join a friendly and inclusive Q&A network for coders

  • 🖥Pick the technologies you like & read great content through your feed.
  • 💬Ask a question when you want to learn more about anything.
  • 🚀Share what you know & build your portfolio.
Sign up nowLearn more

loading ...