Lurker News
In the late 2000s and early 2010s, I remember seeing lots of hype around building distributed systems using message queues (e.g. Amazon SQS, RabbitMQ, ZeroMQ, etc.) A lot of companies had blog posts highlighting their use of message queues for asynchronous communication between nodes, and IIRC the official AWS design recommendations at the time pushed SQS pretty heavily.

Now, I almost never see engineering blog posts or HN posts highlighting use of message queues. I see occasional content related to Kafka, but nothing like the hype that message queues used to have.
What changed? Possible theories I'm aware of:
* Redis tackled most of the use-case, plus caching, so it no longer made sense to pay the operational cost of running a separate message broker. Kafka picked up the really high-scale applications.
* Databases (broadly defined) got a lot better at handling high scale, so system designers moved more of the "transient" application state into the main data stores.
* We collectively realize that message queues-based architectures don't work as well as we hoped, so we build most things in other ways now.
* The technology just got mature enough that it's not exciting to write about, but it's still really widely used.
If people have experience designing or implementing greenfield systems based on message queues, I'd be curious to hear about it. I'd also be interested in understanding any war stories or pain points people have had from using message queues in production systems.

Comments (364) 125 threads

Earlier comments
Copenjin1 reply#
I really hope that people are slowly starting to understand that using kafka and turning it in a single point of failure (yes, it fails) of your architecture is not a good idea.

This pattern has it's uses, but if you are using it everywhere, every time you have some sort of notifications because "it's easy" or whatever, you are likely doing it wrong and you will understand this at some point and it will not be pleasant.

d0mine1 reply#
It is impressive if kafka is the weakest link in your system (99.99% is achievable and even 99.999% is not impossible with the architecture)
Copenjin#
I've yet to see the numbers you list live, but in addition to pure uptime, I've seen a lot of instances where it has been used as the default communication channel instead of proper RPCs, with devastating effects on the long run from the point of view of issues, debugging, predictability, etc...

It's being overused where it has no reason to be, good and simple on paper, awful in the way many are using it. Most of the times, you don't need it.

Joel_Mckay1 reply#
We often use RabbitMQ like middle-ware, and it is boring because it has proven very reliable.

Most people that deal with <40k users a day will have low server concurrency loads, and can get away with database abstracted state-machine structures.
Distributed systems is hard to get right, and there are a few key areas one needs to design right...
If I was to give some guidance, than these tips should help:
1. user UUID to allow separable concurrent transactions with credential caching
2. global UTC time backed by GPS/RTC/NTP
3. client side application-layer load-balancing through Time-division multiplexing (can reduce peak loads by several orders of magnitude)
4. store, filter, and forward _meaningful_ data
5. peer-to-peer AMQP with role enforcement reduces the producer->consumer design to a single library. i.e. if done right the entire infrastructure becomes ridiculously simple, but if people YOLO it... failure is certain.
6. automatic route permission and credential management from other languages can require a bit of effort to sync up reliably. Essentially you end up writing a distributed user account management system in whatever ecosystem you are trying to bolt on. The client user login x509 certs can make this less laborious.
7. redacted
8. batched payload 128kB AMQP messages, as depending how the consumer is implemented this can help reduce hits to the APIs (some user UUID owns those 400 insertions for example.)
9. One might be able to just use Erlang/Elixir channels instead, and that simplifies the design further.
Have a great day, =3

tensility1 reply#
Tip #7 is my favorite. ;-p
Joel_Mckay#
#7 is extremely important...

If it was free it would be worthless... lol =3

langsoul-com#
Message based tech is less popular to talk about, not that it's less used overall.

These days, with AI, vector dbs are all the rage, so everyone hops onto that train.

1290cc#
I use web hooks now and they work really well for asynchronous situations. Spinning up a base app in node to do this is super simple and much easier to maintain than doing it in a kafka message bus.

Nice to see so many developers owning up to the "resume building" and being pragmatic about solving human/business problems versus technology for the sake of it.

Load more comments