Question

Can someone please help me wrap my head around this problem

Given X number of servers that generate some message and a simulation duration of T seconds, at what time intervals should each server generate a message, so that on an average, there are 200 messages/sec generated.

Using a PRNG, i generated a uniform distribution of time intervals for each X server over T seconds, but how do i ensure that these intervals would result in 200 messages per second?

Thank you,

Was it helpful?

Solution

How is T important? Each server should generate 200/X messages per second, uniformly. To generate a schedule, draw 200/X samples from a uniform distribution on [0, 1) and time the messages accordingly (and repeat every second, or draw 200T/X samples from [0,T) right away).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top