Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In case of low desired RPM, number of subscriber instances going to negative #3

Open
RiflerRick opened this issue May 23, 2019 · 4 comments
Assignees
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@RiflerRick
Copy link
Owner

RiflerRick commented May 23, 2019

Screenshot from 2019-05-23 18-55-22

the config environment variables that were used are:

      - TIME_SERIES_TICK_MS=1000
      - METRIC_POLL_TICK_MS=1000
      - TEMP_TABLE_PREP_SIZE_RATIO=0.10
      - PREP_PHASE_CHUNK_SIZE=1000000
      - TEMP_TABLE_RUN_SIZE_RATIO=0.10
      - RUN_PHASE_PUBLISH_CHUNK_SIZE=10000
      - RUN_PHASE_PUBLISH_SLEEP_TIME=200
      - APPROX_TABLE_SIZE=102157035

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

@RiflerRick RiflerRick added the bug Something isn't working label May 23, 2019
@RiflerRick
Copy link
Owner Author

RiflerRick commented May 23, 2019

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

c.minSubscribeSleepTime = 10

the sleep time it starts with is (10+500)/2.
msc.cM.sleepTime = map[string]interface{}{

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).

@RiflerRick
Copy link
Owner Author

RiflerRick commented May 23, 2019

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

c.minSubscribeSleepTime = 10

@RiflerRick RiflerRick added the help wanted Extra attention is needed label May 23, 2019
@RiflerRick RiflerRick self-assigned this May 23, 2019
@RiflerRick RiflerRick pinned this issue May 23, 2019
@RiflerRick RiflerRick unpinned this issue May 23, 2019
@RiflerRick
Copy link
Owner Author

@RiflerRick
Copy link
Owner Author

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

@RiflerRick RiflerRick reopened this May 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant