Open RiflerRick opened 5 years ago
This is actually a feature, not a bug. From the picture the desired RPM given is 60 for create and the min and max subscribe sleep times are 10 and 500 https://github.com/RiflerRick/b2/blob/8908cfa12b2083f96737229071ecd625ba74da1a/src/bombard.go#L671 the sleep time it starts with is (10+500)/2. https://github.com/RiflerRick/b2/blob/8908cfa12b2083f96737229071ecd625ba74da1a/src/bombard.go#L307 The most probable scenario here is that the sleep time throughout is remaining low enough for the RPM to be higher than 60(which is a pretty low RPM).
As a fix for this we can simply go ahead and change the values of the min and max subscribe sleep time to be 500ms and 5000ms in the very same places https://github.com/RiflerRick/b2/blob/8908cfa12b2083f96737229071ecd625ba74da1a/src/bombard.go#L671
https://github.com/RiflerRick/b2/pull/7/files#diff-d12a83a064d0575f7b203852c581f88dL671 This PR fixes the issue!
Based on the value of the maxSubscriberSleepTime
, it is possible to note, what would be the min RPM of the subscriber we are expecting for any queryType, if the desired RPM given is less than that min RPM, an error should be raised at the beginning aborting the script
the config environment variables that were used are:
In case the RPM is given a low value, the number of instances going to a negative value. The most probable cause of this would be that the rate at which new instances are created because of the number of instances going zero is actually less than the rate at which instances are getting downscaled due to RPM