Dabish Digital
Development

Three myths about background jobs

The gap between knowing this and actually doing it is where most teams lose ground. A few things about background jobs that get repeated more often than they get checked.

Most development decisions are really maintenance decisions wearing a different hat. The failure mode is not doing it wrong, it is doing it once and assuming it stays done.

“It only matters for big sites”

Anything slow should happen outside the request cycle. Getting it slightly wrong is survivable. Ignoring it entirely is not. The version that survives contact with a real deadline is the simple one.

“We can deal with it after launch”

Sometimes true, usually expensive. That sounds obvious written down. It is still the thing most often skipped.

“Our platform handles it”

Monitor the queue depth or failures pile up unnoticed. There is a version of this that is over-engineered, and it is worth avoiding. The version that survives contact with a real deadline is the simple one.

How to tell if yours is fine

Code gets read far more often than it gets written, and usually by someone with less context than the author had. 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.