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

Implement Event Processor load balancing strategy improvements #11768

Closed
jsquire opened this issue May 4, 2020 · 0 comments
Closed

Implement Event Processor load balancing strategy improvements #11768

jsquire opened this issue May 4, 2020 · 0 comments
Assignees
Labels
blocking-release Blocks release Client This issue points to a problem in the data-plane of the library. Event Hubs
Milestone

Comments

@jsquire
Copy link
Member

jsquire commented May 4, 2020

Summary

The current implementation of the load balancer for the EventProcessor<TPartition> makes use of a single approach for claiming partition ownership, which is optimized for fair distribution and to avoid "bouncing partitions" as processors starting up would battle for control and steal from one another. This approach is a solid strategy for the majority case, but does not scale well for more advanced scenarios. For example, when there are two thousand partitions, the amount of time needed for active processors to fully distribute them is unreasonably long and leads to an undesirable delay in processing.

In order to ensure that the processor can better meet the needs of our varied scenarios, it should support multiple strategies so that applications that use the client can choose the one that best suits their unique needs.

Scope of Work

  • Enhance the EventProcessor<TPartition> load balancer to enable different strategies for claiming partitions, based on the accepted design.

  • Enhance the EventProcessor<TPartition> to accept the desired strategy for load balancing as part of its options.

  • Enhance the EventProcessorClient to accept the desired strategy for load balancing as part of its options.

Out of Scope

  • Allowing injection of a custom strategy outside the predefined set; if a concrete need is determined for this, it will be covered under a dedicated work item in the future.

Success Criteria

  • The EventProcessor<TPartition> load balancer understands multiple strategies for claiming ownership of partitions to process, and can act on each strategy as appropriate.

  • The processor types accept a load balancing strategy as an option and correctly apply it.

  • The tests necessary for its validation have been created or adjusted and pass reliably; tests that do not focus on the extension points have been removed and no base functionality is included.

  • The existing live test suite continues to produce deterministic results and pass reliably.

Related Issues and References

@jsquire jsquire added Event Hubs Client This issue points to a problem in the data-plane of the library. labels May 4, 2020
@jsquire jsquire added this to the [2020] July milestone May 4, 2020
@jsquire jsquire modified the milestones: [2020] July, [2020] June May 4, 2020
@jsquire jsquire modified the milestones: [2020] June, [2020] July May 7, 2020
@jsquire jsquire added the blocking-release Blocks release label Jun 5, 2020
@jsquire jsquire self-assigned this Jun 30, 2020
@jsquire jsquire closed this as completed Jul 2, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Mar 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
blocking-release Blocks release Client This issue points to a problem in the data-plane of the library. Event Hubs
Projects
None yet
Development

No branches or pull requests

1 participant