Scheduling algorithm: Suggestions?

A

Allen Fowler

Hello,

I have a batch of "rpc style" calls that I must make to an external server via HTTP in a multi threaded fashion. (Return vales must be saved.) Problem is, I need to throttle the rate at which I do this.

Each HTTP call takes between 0.2 and several seconds to complete.

I need to control two different aspects:

1) Number of new connections per second.
2) Total number of parallel connections allowed.

Additionally, it is possible that an HTTP call could result in an error at the remote server. If so, it must be retried couple of times before an error is logged.

Does anybody have a suggestions as to the correct way to implement such a system in Python?

Thank you,
:)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top