Skip to content

Redundant set/unset throttling during the rebalance #1972

@CCisGG

Description

@CCisGG

Today, Cruise Control are setting/resetting replication rate throttles on a per-task base. E.g. it set throttling before a task executes:

throttleHelper.setThrottles(tasksToExecute.stream().map(ExecutionTask::proposal).collect(Collectors.toList()));

Then clear the throttling for the broker after task finished and if there is no ongoing-task on the same broker:

throttleHelper.clearThrottles(completedTasks, inProgressTasks);

Note that each set/clear throttle will be an individual Kafka admin request, will may take a couple of seconds.

The problem is: there can be a lot of tasks in the backlog that is involving the same broker. It doesn't make senses to set/clear the throttling for the same broker again and again on every task execution batch. From local unit test running, it takes ~20 seconds for adminClient to handle each set/clear throttle request.

If we set the throttling for broker at the beginning of the execution, and only clean up the throttling after all tasks finished execution, that should speed up the rebalance.

Note: this is not the concurrency throttling, but the replication bytes throttling. This throttle is set by Cruise Control sending request to kafka brokers to cap the max replication bytes rate.

Metadata

Metadata

Assignees

Labels

functionalityA feature request.good first issueA good fit as a first issue in the project.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions