Tinker Queues and background jobs

by Samy (Kondasamy Jayaraman) · drawn with Colorfigures by April Zhu

09:00

09:00. Today: 2 given up, 18 retries, at most 4 due in one minute.0 waiting · 1 busy · 0 done

Chapter 4 of 7

Try again later

Mid-sale, the courier’s booking site stops answering. Jobs fail, and the workers put them back to try again.

This chapter: How soon should a failed job try again?

About this chapter

You will learn

  • A retry tries a failed job again
  • Backoff waits longer after each failure
  • Jitter spreads retries so they don’t land together

Words you’ll meet

Retry
Trying a failed job again.
Backoff
Waiting longer before each new try, doubling the wait each time.
Jitter
A random part of the wait, so jobs that failed together don’t retry together.

Step 1 of 6

At 09:10 the courier’s site goes down. A failed job gets a at once, up to 4 tries.

Step to 09:12.