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

[Feature] Enhanced horizontal scaling of app controller #4596

Closed
fourierr opened this issue Aug 10, 2022 · 5 comments
Closed

[Feature] Enhanced horizontal scaling of app controller #4596

fourierr opened this issue Aug 10, 2022 · 5 comments
Assignees
Labels
area/controller K8s controller related issue type/enhancement New feature or request
Milestone

Comments

@fourierr
Copy link
Member

Is your feature request related to a problem? Please describe.
Due to the leader-election of the controller, when there are thousands of application CRs in the hubcluster,
the new application will be delayed for updating longer and longer time.

Describe the solution you'd like
For this issue, i have made some experimental solution.
We want to dispatch several deployment of app controller in hubcluster.
Firstly, enabling the leader election and set leader-election-resource-name with different name e.g sharding-1, sharding-2.
Secondly, we add a label tag for every application CR, e.g app.oam.dev/sharding=sharding-1
Thirdly, add a filter to controller's eventFilter. Only the value of label tag is equal to leader-election-resource-name, the controller will handle the application CR.

The final effect is: application CR with label value of sharding-1 will only be processed by app controller with leader-selection-resource-name value of sharding-1

@Somefive
Copy link
Collaborator

Great! This solution looks good and is similar to what I have been thinking for sharding. Would you like to make a PR for that?

@FogDong FogDong added type/enhancement New feature or request area/controller K8s controller related issue labels Aug 10, 2022
@fourierr
Copy link
Member Author

Great! This solution looks good and is similar to what I have been thinking for sharding. Would you like to make a PR for that?

Of course, i will make a PR.

@wonderflow
Copy link
Collaborator

lgtm

@wonderflow
Copy link
Collaborator

Just FYI, there's another solution for this issue, which don't need change the controller code: https://github.com/openkruise/controllermesh

@wonderflow
Copy link
Collaborator

Sharding is supported now, please check #5360

It will be released in 1.8.0 and you can already enjoy this feature in https://github.com/kubevela/kubevela/releases/tag/v1.8.0-alpha.1

Closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/controller K8s controller related issue type/enhancement New feature or request
Projects
None yet
4 participants