Formula for maximal usage

82 Views Asked by At

I'm a programmer with a way to easy question for this site, please correct me if I'm wrong.

I have the following given:

Request Rate: 39 000 requests per hour
Variable number of products I need to run a request for
Variable number of marketplaces I have products in 

What I need to achieve is to get the amount of requests per marketplace per hour in relation to the amount of products in the given marketplace.

As an example, I have the following:

marketplaces:     A          B           C           D          E 
products:       1500       2500          80        1000        40    

So at first I have calculated the relation from all products to the products on the given marketplace, but I get stuck with how to best use it.

Basically, I want to run the requests on marketplace B with a much higher speed as the requests for marketplace C and E but always only with the speed I can go to not exceed the 39000r/hour limit (but coming as close to this as possible), but I can't find the correct formula for it.

Can someone push me in the right direction?

1

There are 1 best solutions below

1
On BEST ANSWER

You need to think more about what you want. As the question is written, run B 38996 times per hour and the others once, for a total of 39000. I think closer to what you want is to note you have 5120 products total, so run B $\frac { 2500}{5120}\cdot 39000$ times per hour and the others in proportion to the number of products