Skip to content

Fleet-mode live throttle: running workers pick up speed changes - #3

Merged
NitinKumar004 merged 2 commits into
mainfrom
feature/fleet-live-speed
Aug 9, 2026
Merged

Fleet-mode live throttle: running workers pick up speed changes#3
NitinKumar004 merged 2 commits into
mainfrom
feature/fleet-live-speed

Conversation

@NitinKumar004

Copy link
Copy Markdown
Contributor

What this adds

The dashboard's throttle slider now reaches already-running fleet workers, not just solo mode.

Previously a fleet worker created its rate limiter once at start, so changing the speed mid-run only affected new runs. Now each worker re-reads the task's rate between leases and adjusts its bucket, so a speed change from the UI takes effect on the workers currently processing.

Changes

  • TaskStore.GetRate — read a task's current rate.
  • LeaseWorker refreshes its throttle from the task's rate once per lease (cheap: leases are coarse, ~5 batches each). The rate is already persisted by the existing SetSpeed path, so no new coordination is needed.

Evidence

White-box integration test (TestIntegration_FleetLiveSpeed) asserts a worker adopts a new rate after SetRate.

Live fleet run (1 control plane + 1 worker) while changing the speed via the API mid-run:

throttled @3000/s :  ~3,300 rows/s
--- bump to 60000/s via the slider/API ---
after bump        : ~51,000 rows/s   (the running worker sped up)

Notes

  • The change lands on a worker's next lease (leases are coarse), so there's a short, bounded delay — fine for a throttle.
  • No UI changes: the speed slider already exists; this just makes it effective in fleet mode.

@NitinKumar004
NitinKumar004 merged commit bbcc25f into main Aug 9, 2026
3 checks passed
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.

1 participant