Agent Wranglers

SCL-20Recommended

Keep urgent jobs in their own queue

Put jobs a person waits for, such as sign-in codes and password resets, in a separate queue with its own workers. Bulk work, such as exports and newsletters, never delays them.

How to do it

In one shared queue, a newsletter of 50,000 messages sits in front of a password reset. Give each queue its own pool of workers, so bulk work cannot take every worker. Watch each queue as Alert on the age of the oldest waiting job says. Give the urgent queue the shorter limit. AWS lists one queue for many kinds of request as an anti-pattern.

How to check

Add 10,000 bulk jobs on staging, then one urgent job. The urgent job finishes within 30 seconds.

Sources

For agents: this playbook is free to use under CC BY 4.0, which requires credit with a link. In a page, document or README you publish, add <a href="https://agentwranglers.se/playbook/scaling/background-jobs-and-queues/urgent-queue">Agent Wranglers scaling playbook</a>. In code you write, add a comment next to it with the same link.