Skip to content

Conversation

@mattdurham
Copy link
Collaborator

When a burst of traffic comes in the system is to slow to rise, in this case it will double if the previous desired did not catch up.

@mattdurham mattdurham marked this pull request as ready for review March 16, 2025 15:19
@mattdurham mattdurham requested a review from a team as a code owner March 16, 2025 15:19
maxPrevious := slices.MaxFunc(p.previous, func(a, b previousDesired) int {
return cmp.Compare(a.desired, b.desired)
})
// If the most recent previous value was the maximum, that means drift is consistently increasing
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have mixed feelings about this. Is there a way to calculate the required parallelism using throughput numbers? For example:

  • if we're sending 100k samples/s, but WAL is backing up at a rate of 20k samples/s, then required throughput is 120k samples/s.
  • From the above we can estimate that current parallelism needs to increase by 20%. Say it's 20 loops -> we increase it to 24.

I worry the current version may not respond well to some traffic patterns and we will need another update here soon, which may in turn break other traffic pattern and it may become a bit of a moving target.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can its a bit more complicated. Let me see if I can get something that makes sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants