Dabish Digital
Development

Background jobs, explained without the jargon

The advice here is unglamorous, which is probably why it gets skipped. Here is background jobs without the vocabulary that usually surrounds it.

Code gets read far more often than it gets written, and usually by someone with less context than the author had. The teams that stay on top of it are the ones who put it on a calendar rather than a wish list.

The short version

Anything slow should happen outside the request cycle. There is a version of this that is over-engineered, and it is worth avoiding. Doing this properly once is usually cheaper than doing it approximately three times.

Why people complicate it

Most of the confusion comes from tooling rather than from the idea itself. Where this goes wrong is almost never a lack of knowledge.

Jobs need retries, because networks fail. The reasoning matters more than the rule, because the rule has exceptions. If it only works because one person remembers to do something, it does not work yet.

Turning this into a decision

Monitor the queue depth or failures pile up unnoticed. This is the sort of thing that compounds, quietly, in both directions. Write the reasoning down alongside the decision, because the reasoning is what changes first.

In practice

Most development decisions are really maintenance decisions wearing a different hat. 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

The point is not perfection, it is knowing which of these you have consciously chosen to skip.