Some work takes too long to leave somebody waiting in front of a screen. A hundred-page PDF. A thousand emails. An upload to somebody else’s system. A queue separates the starting from the doing.
The sequence is plain. The request files a job in the queue and answers straight away. A separate process, the worker, takes jobs out and works them off. If something goes wrong, the job is tried again.
What this means in production
Queues are not purely a development matter; they change how the thing is run. There is now an additional permanently running process that has to be watched and restarted after a deployment, because otherwise it carries on working with the old code.
In applications that have grown over years, the most common fault is not a broken job. It is a worker that has not been running for weeks. From the outside everything looks normal; in the background nothing is happening any more. So queue length and the number of failed jobs are among the figures we keep an eye on under maintenance.