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] Users will not be affected at all when auto-scaling #7

Open
renajin opened this issue Aug 5, 2021 · 2 comments
Open

[Feature] Users will not be affected at all when auto-scaling #7

renajin opened this issue Aug 5, 2021 · 2 comments

Comments

@renajin
Copy link
Contributor

renajin commented Aug 5, 2021

Feature Request

Is your feature request related to a problem? Please describe:
When the middleware decides to scale-in, there are still some running sqls at this time, if the tidb node currently running sql is deleted, connection interrupted is a terrible thing.

Describe the feature you'd like:
Ensure that these processes are not affected.

Describe alternatives you've considered:
We use admission webhook to solve this problem, scale module decide which nodes will be deleted and inform nodes' indexs to statefulset, the validating admission webhook now can intercept this request and distinguish whether it is tidb or other resources like tikv,pd, and then, send request of tidb to proxy with deletion information, The proxy will forward traffic of those nodes to other tidbs and ensure that sql being executed ends smoothly, when there are no more unprocessed tasks on these nodes, the proxy will notice webhook to release that deletion request, Finally statefulset will safely delete those nodes

Teachability, Documentation, Adoption, Migration Strategy:

@spxcmss
Copy link
Contributor

spxcmss commented Aug 9, 2021

Which nodes are selected to be deleted based on which indicators?

@renajin
Copy link
Contributor Author

renajin commented Aug 9, 2021

By calculating the number of transactions, scale module can select nodes with the smaller number of transactions, and then advanced statefulSet will delete those nodes.

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

No branches or pull requests

2 participants