cadence-client icon indicating copy to clipboard operation
cadence-client copied to clipboard

rework on poller auto scaler

Open shijiesheng opened this issue 1 year ago • 3 comments

Detailed Description

Improve performance of poller auto scaler by using more accurate scaling signals and several implementation changes.

Changes

  • New WorkerOptions AutoScalerOptions is introduced.
  • Several WorkerOptions are deprecated and become no-op.
  • read new signal (poller wait time) to scale
  • allow kill switching poller auto scaler from server
  • new implementation that makes scaling quicker to traffic change
  • removed no longer used autoscaler package completely (original implementation is over complicated)

Impact Analysis

  • Backward Compatibility: NO existing autoscaling will be stopped but this shall not have big impact since this feature was never rolled out in production. For OSS users, please follow the instructions below in rollout plan.
  • Forward Compatibility: Yes, introduce new

Testing Plan

  • Unit Tests: Yes
  • Persistence Tests: Not related
  • Integration Tests: No
  • Compatibility Tests: No, because it's autoscaler is a feature that was not rolled out in production.

Rollout Plan

  • What is the rollout plan? For Uber services, standard client release steps For OSS users, turn off autoscaler feature first before the client upgrade.

  • Does the order of deployment matter? No

  • Is it safe to rollback? Does the order of rollback matter? Yes

  • Is there a kill switch to mitigate the impact immediately? Yes, the new autoscaler feature is an opt-in feature.

shijiesheng avatar Dec 10 '24 19:12 shijiesheng

Codecov Report

Attention: Patch coverage is 87.89062% with 31 lines in your changes missing coverage. Please review.

Project coverage is 82.03%. Comparing base (526cb2d) to head (7895fd4). Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
internal/worker/concurrency_auto_scaler.go 91.47% 10 Missing and 5 partials :warning:
internal/internal_worker_base.go 62.85% 12 Missing and 1 partial :warning:
internal/internal_worker.go 88.46% 2 Missing and 1 partial :warning:
Files with missing lines Coverage Δ
internal/internal_task_handlers.go 81.87% <100.00%> (+0.25%) :arrow_up:
internal/internal_task_pollers.go 83.16% <100.00%> (+0.61%) :arrow_up:
internal/internal_utils.go 76.58% <ø> (ø)
internal/worker.go 40.00% <100.00%> (ø)
internal/internal_worker.go 76.29% <88.46%> (-0.42%) :arrow_down:
internal/internal_worker_base.go 73.95% <62.85%> (+2.59%) :arrow_up:
internal/worker/concurrency_auto_scaler.go 91.47% <91.47%> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 526cb2d...7895fd4. Read the comment docs.

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

codecov[bot] avatar Dec 21 '24 10:12 codecov[bot]

to stick it in here too: overall looks pretty good. simpler and the overall goal (and why it achieves it) is clearer too. seems like just minor tweaks (many optional) and it's probably good to go

Groxx avatar Jan 02 '25 18:01 Groxx

coverage failed due to deprecation changes

shijiesheng avatar Jun 17 '25 21:06 shijiesheng