Skip to content

fixed startup cost - #175

Merged
tomellm merged 1 commit into
mainfrom
tom/#174-startup-cost
May 30, 2024
Merged

tomellm merged 1 commit into
mainfrom
tom/#174-startup-cost

Conversation

@tomellm

@tomellm tomellm commented May 30, 2024

Copy link
Copy Markdown
Contributor

#174 Before when big spikes of requests would happen the ratelimiter would raise the level so high that nothing would run anymore and then slowly drop it back down where it would then jump back up. This would take quite a while to stabilize until all the caches were up to date and the requests would diminish.

Now the ratelimiter only raises the level by one at a time makeing it less sensitive to very short and sudden spikes in requests.

Also changed some logging to have a clearer view into what is happening.

@henrybley henrybley left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lgtm lets see how it works

@tomellm
tomellm force-pushed the tom/#174-startup-cost branch from 7713fd7 to 54f51c6 Compare May 30, 2024 10:09
@tomellm

tomellm commented May 30, 2024

Copy link
Copy Markdown
Contributor Author

@henrybley I found other things that I can fix, it was just a single function that wasn't testable

@tomellm
tomellm force-pushed the tom/#174-startup-cost branch from 54f51c6 to bd9544e Compare May 30, 2024 10:39
Before when big spikes of requests would happen the ratelimiter would raise the level so high
that nothing would run anymore and then slowly drop it back down where it would then jump
back up. This would take quite a while to stabilize until all the caches were up to date
and the requests would diminish.

Now the ratelimiter only raises the level by one at a time makeing it less sensitive to very
short and sudden spikes in requests.

Also changed some logging to have a clearer view into what is happening.
@tomellm
tomellm force-pushed the tom/#174-startup-cost branch from bd9544e to d547b2f Compare May 30, 2024 10:57
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
71.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarCloud

@tomellm
tomellm merged commit 594f367 into main May 30, 2024
@tomellm
tomellm deleted the tom/#174-startup-cost branch May 30, 2024 11:05
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