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

Make scalers into per-task hub singletons #2967

Merged
merged 4 commits into from
Nov 21, 2024
Merged

Make scalers into per-task hub singletons #2967

merged 4 commits into from
Nov 21, 2024

Conversation

cgillum
Copy link
Member

@cgillum cgillum commented Nov 15, 2024

This PR improves the efficiency of scale logic with the Azure Storage backend by creating a singleton scaler object for an entire task hub rather than having one per function, which is redundant since each scaler does the exact same work (regardless of function).

Resolves issue where storage costs increase dramatically when Scale Controller v3 is in use (same for when runtime-driven scaling is in use).

FYI @AnatoliB

Pull request checklist

  • My changes do not require documentation changes
    • Otherwise: Documentation PR is ready to merge and referenced in pending_docs.md
  • My changes should not be added to the release notes for the next release
    • Otherwise: I've added my notes to release_notes.md
  • My changes do not need to be backported to a previous version
    • Otherwise: Backport tracked by issue/PR #issue_or_pr
  • I have added all required tests (Unit tests, E2E tests)
  • My changes do not require any extra work to be leveraged by OutOfProc SDKs
    • Otherwise: That work is being tracked here: #issue_or_pr_in_each_sdk
  • My changes do not change the version of the WebJobs.Extensions.DurableTask package
    • Otherwise: major or minor version updates are reflected in /src/Worker.Extensions.DurableTask/AssemblyInfo.cs
  • My changes do not add EventIds to our EventSource logs
    • Otherwise: Ensure the EventIds are within the supported range in our existing Windows infrastructure. You may validate this with a deployed app's telemetry. You may also extend the range by completing a PR such as this one.
  • My changes should be added to v3.x branch.
    • Otherwise: This change only applies to Durable Functions v2.x and will not be merged to branch v3.x.

@cgillum cgillum marked this pull request as ready for review November 20, 2024 19:25
@cgillum cgillum merged commit 7801ed8 into dev Nov 21, 2024
15 checks passed
@cgillum cgillum deleted the singleton-scalers branch November 26, 2024 17:56
cgillum added a commit that referenced this pull request Nov 26, 2024
This addresses an issue where the costs associated with polling storage resources increase substantially when an app has a large number of durable-trigger functions compared to apps that only have a small number.
nytian pushed a commit that referenced this pull request Nov 26, 2024
* Make scalers into per-task hub singletons (#2967)

This addresses an issue where the costs associated with polling storage resources increase substantially when an app has a large number of durable-trigger functions compared to apps that only have a small number.

* Remove unnecesary #ifdef

* Update nuget package versions
@cgillum cgillum linked an issue Dec 3, 2024 that may be closed by this pull request
nytian added a commit that referenced this pull request Dec 5, 2024
* cherry pick change for sc

* update version to rc.3

* remove warnings

* cherry pick Use consistent scaler IDs for target-based and scale monitor implemen…

---------

Co-authored-by: Chris Gillum <[email protected]>
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.

Unexplained rise in storage activity causing higher costs
3 participants