Queue
A queue is a mechanism for processing tasks asynchronously, outside the main HTTP request. Instead of sending an email or generating a report synchronously (making the user wait), the task is placed in a queue and executed by a worker in the background.How it worksThe task is serialised into a queue broker (Redis, RabbitMQ, SQS, database). A separate worker process continuously reads tasks from the queue and executes them. If a task fails — it is automatically retried N times before moving to the dead letter queue.Typical tasksSending emails and SMSGenerating PDFs and reportsImage resizingCalling external APIsIndexing into a search engineQueue brokersRedis — the simplest option for small projects. RabbitMQ — an AMQP broker with flexible routing. Amazon SQS — a cloud solution with no infrastructure to manage. Apache Kafka — for high volume and event streaming.