I have a set of jobs that start by querying an external server for a payload. On receiving the payload, the internal server takes a variable amount of time to complete the job, hence the 'weight'. What I'd like to do is schedule the jobs in such a way that stress on the external server is minimized: if I ran lots of consecutive 'light' jobs, for instance, the server might not be able to handle the traffic and go down. I can think of some easy approaches, like just alternating light jobs with heavy ones, but is this problem formally stated somewhere? It'd be nice to refer to that.


  • The correct term would be "throttling". Please try to search for relevant answers (and from other resources on the internet), and if you still have unanswered questions, you can edit this question in order to reopen it. – rwong Mar 7 '17 at 11:40
  • There are several ways to design such an algorithm, and I am sure there are algorithms and even libraries already out there that can help. However, the question needs more details and perhaps examples to help provide more context before it can be answered in a meaningful way. – user22815 Mar 7 '17 at 23:20
  • 1
    Not clear why consecutive light jobs would stress the server – paparazzo Mar 8 '17 at 16:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.