All Questions
Managing Long Running Tasks hard

For a task like 'Email all 1 million users', how do you avoid a single worker timing out?

  1. A Increase timeout to 24 hours.
  2. B Partition/Split the task. The initial worker creates 1000 sub-tasks (pages of 1000 users each) and pushes them to the queue. 1000 workers then process them in parallel.
  3. C Use a bigger server.
  4. D Use a GPU.

One system design question a day, with spaced repetition so the ones you miss come back.

Get the app

Related questions