Work outside the request.
WHAT TO MOVE OUT OF A REQUEST
Sending mail Processing files and images Calling external services Generating reports Anything slow
WHY
A request should return quickly, and anything slow risks timing out and degrades the experience.
WHAT A QUEUE PROVIDES
Accepting work now, performing it later, with retries.
WHAT TO CONFIGURE
Retry behaviour, with increasing delay A limit on attempts Handling of permanently failed work
WHAT TO ENSURE
That work is safe to run twice.
WHY
Retries happen, and duplicates otherwise result.
HOW
Record what has been processed, and check before acting.
WHAT SCHEDULED WORK REQUIRES
A reliable scheduler Protection against overlapping runs Logging that it ran Alerting when it does not
WHY THAT LAST POINT
A failing scheduled job fails silently for months otherwise.
WHAT TO MONITOR
Queue depth, failures, and whether workers are running.