Dabish Digital
Development

Before you invest in background jobs

The advice here is unglamorous, which is probably why it gets skipped. Before you spend anything on background jobs, it is worth confirming a few things are already true.

Code gets read far more often than it gets written, and usually by someone with less context than the author had. It is worth deciding this deliberately rather than inheriting whatever the last person set up.

Prerequisites

  • You can describe the outcome you want in one sentence
  • Someone owns it after the work is done
  • Anything slow should happen outside the request cycle
  • You have a way to tell whether it worked

Warning signs

Jobs need retries, because networks fail. Where this goes wrong is almost never a lack of knowledge. Budget a little time for it every quarter and it never becomes a project of its own.

Monitor the queue depth or failures pile up unnoticed. None of that requires a large budget, only a decision and someone to own it. Most teams find the first pass takes an afternoon and the maintenance takes minutes a month.

How to tell if yours is fine

The question is rarely whether something can be built, but what it costs to keep running afterwards. Three things worth confirming about background jobs before you move on:

  • Someone can say what the current setup is without going to look
  • Jobs need retries, because networks fail — and you know whether that is true here
  • There is a way to tell whether the last change to this helped

None of this needs a rewrite. Most of it is a morning's work once someone decides to do it.