Skip to content

Visibility into LagBased AutoScaler desired task count#16199

Merged
georgew5656 merged 6 commits intoapache:masterfrom
ac9817:adithyachakilam/enable-sacle-notice-skipped-metrics
Mar 27, 2024
Merged

Visibility into LagBased AutoScaler desired task count#16199
georgew5656 merged 6 commits intoapache:masterfrom
ac9817:adithyachakilam/enable-sacle-notice-skipped-metrics

Conversation

@ac9817
Copy link
Copy Markdown
Contributor

@ac9817 ac9817 commented Mar 25, 2024

This PR provides visibility into the actions taken by LagBasedAutoScaler and shows us the behaviour of auto scaler. This introduced metric provides insight into what actually is desired task count, how many times did we skip such actions etc. Info obtained from this metric could later be used to tweak the auto scaler config.

Release note

  • Druid operator could compare between ingest/autoScaler/lagBased/requiredTasks and task/running/count to know the exact gap between current and desired task counts.
  • Druid operator could now track how many times a scale action has been skipped because
    • It occurred too early than minTriggerScaleActionFrequencyMillis.
    • Task count is already at max/min and couldn't scale further.

Key changed/added classes in this PR
  • DynamicAllocationTasksNotice
  • LagBasedAutoScaler

This PR has:

  • been self-reviewed.
  • added documentation for new or modified features or behaviors.
  • a release note entry in the PR description.
  • added Javadocs for most classes and all non-trivial methods. Linked related entities via Javadoc links.
  • added or updated version, license, or notice information in licenses.yaml
  • added comments explaining the "why" and the intent of the code wherever would not be obvious for an unfamiliar reader.
  • added unit tests or modified existing tests to cover new code paths, ensuring the threshold for code coverage is met.
  • added integration tests.
  • been tested in a test Druid cluster.

Copy link
Copy Markdown
Contributor

@abhishekrb19 abhishekrb19 left a comment

Choose a reason for hiding this comment

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

Looks good overall. I left a few naming suggestions and test verification for the new metrics. Thanks, @adithyachakilam!

Comment thread docs/operations/metrics.md Outdated
Comment thread docs/operations/metrics.md Outdated
@ac9817
Copy link
Copy Markdown
Contributor Author

ac9817 commented Mar 26, 2024

@abhishekrb19 Thanks for the review, addressed the comments!

Comment thread docs/operations/metrics.md Outdated
@ac9817 ac9817 changed the title Visibility into skipped scale actions Visibility into LagBased AutoScaler desired task count Mar 26, 2024
@ac9817 ac9817 requested review from abhishekrb19 and kfaraz March 27, 2024 07:43
Copy link
Copy Markdown
Contributor

@kfaraz kfaraz left a comment

Choose a reason for hiding this comment

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

Left some final comments.

Comment thread docs/operations/metrics.md Outdated
{
EasyMock.expect(spec.getSupervisorStateManagerConfig()).andReturn(supervisorConfig).anyTimes();

EasyMock.expect(spec.getDataSchema()).andReturn(getDataSchema()).anyTimes();

Check notice

Code scanning / CodeQL

Deprecated method or constructor invocation

Invoking [SeekableStreamSupervisorSpec.getDataSchema](1) should be avoided because it has been deprecated.
{
EasyMock.expect(spec.getSupervisorStateManagerConfig()).andReturn(supervisorConfig).anyTimes();

EasyMock.expect(spec.getDataSchema()).andReturn(getDataSchema()).anyTimes();

Check notice

Code scanning / CodeQL

Deprecated method or constructor invocation

Invoking [SeekableStreamSupervisorSpec.getDataSchema](1) should be avoided because it has been deprecated.
@georgew5656
Copy link
Copy Markdown
Contributor

merging as this looks good to me and all the comments have been addressed

@georgew5656 georgew5656 merged commit a65b2d4 into apache:master Mar 27, 2024
@adarshsanjeev adarshsanjeev added this to the 30.0.0 milestone May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants