Draft: Implement ResourceUsageLimit sidekiq server middleware
What does this MR do and why?
This MR introduces a Sidekiq server middleware to track db duration used and increases a counter if the limit is exceeded. The MR also introduces Gitlab::SidekiqLimits
module to configure resource usage limits for different resource types. It defines limits for db_main_duration_s
and db_main_duration_s
in this MR.
This is the first phase of work in gitlab-com/gl-infra/scalability#3818 to define resource usage limits for Sidekiq workers.
TODO
-
add specs -
add feature flag
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Before | After |
---|---|
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.