Menu

How do you handle cron across multiple pods without leader election or distributed locks?

Reddit r/Backend·u/a_ristotelis·8 days ago
#exoYhTof
#leader#without#cron#multiple#locks
Reading 0:00
15s threshold

When scaling backend services to multiple replicas or pods, scheduled cron jobs get tricky fast because by default every instance fires the exact same job at the same time.

From what I've seen, people usually pick one of these routes: 1. Dedicated Worker Fleets (BullMQ, Hangfire, Celery, Temporal, SQS): Great for heavy background jobs, but feels like massive infrastructure overhead if you only need 2 or 3 recurring maintenance tasks (like a 30-second sync, nightly cleanup, or daily digest). 2. Leader Election (K8s Leases, Consul, Raft): One pod is elected leader and runs all crons. Clear mental model, but introduces failover delays if the leader hangs silently, creates bottlenecks, and adds split-brain risks during network splits. 3.…

Continue reading — create a free account

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