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

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top