👋
Welcome to my blog!

Message Queue

Implement message queues in your systems to enable reliable, asynchronous processing and communication.

Message Queue
System Design
Infrastructure

Published At

7/16/2022

Reading Time

~ 1 min read

A message queue is a durable component stored in memory that supports asynchronous communication. It served as a buffer and distributed asynchronous requests. The basic architecture is simple.

Decoupling makes the messages queue a preferred architecture for building scalable and reliable applications. With the message queue, the producer can post a message to the queue when the consumer is unavailable to process it. The consumer can read messages from the queue even when the producer is unavailable.

Consider the following use case: your application supports photo customization, including cropping, sharpening, blurring, etc. Those customization tasks take time to complete in the following figure. Web servers publish photo processing jobs to the message queue. Photo processing workers pick up jobs from the message queue and perform photo customization tasks asynchronously. A producer and consumer can be scaled independently. When the queue size becomes large, more workers are added to reduce the processing time. However, if the queue is empty most of the time, the member of workers can be reduced.

🍇

Do you have any questions, or simply wish to contact me privately? Don't hesitate to shoot me a DM on Twitter.

Have a wonderful day.
Abhishek 🙏

Join My Exclusive Newsletter Community

Step into a world where creativity intersects with technology. By subscribing, you'll get a front-row seat to my latest musings, full-stack development resources, and exclusive previews of future posts. Each email is a crafted experience that includes:

  • In-depth looks at my covert projects and musings to ignite your imagination.
  • Handpicked frontend development resources and current explorations, aimed at expanding your developer toolkit.
  • A monthly infusion of inspiration with my personal selection of quotes, books, and music.

Embrace the confluence of words and wonder, curated thoughtfully and sent straight to your inbox.

No fluff. Just the highest caliber of ideas.