Menu

Your background jobs need SLOs too. 'It eventually ran' isn't good enough
📰

Your background jobs need SLOs too. 'It eventually ran' isn't good enough

DEV Community: postgres·delay.run·11 days ago
#3xUMNoUG
#devtopostgresql#devto#dev#jobs#lateness
Reading 0:00
15s threshold

Most teams can tell you their API's p95 latency. Few can tell you how late their background jobs run.

Ask "how long after a user signs up does the welcome email go out?" and you'll get guesses. "Pretty quickly." "A few seconds?" "Should be instant." Then one day the queue backs up, welcome emails arrive four hours late, password resets take twenty minutes, and nobody knows when it started, because nobody was measuring.

My opinion: background jobs deserve service level objectives just as much as your API does. Not because SLOs are fashionable, but because users experience job latency directly, and "it eventually ran" hides a lot of pain.

Users feel job latency, they just can't see the job

Look at what typically runs in the background:

password reset and magic-link emails

payment confirmations and receipts

file exports and report generation

notifications ("someone replied to you")

webhooks to your customers' systems

Every one of these has an implicit promise.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.