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

RFC: Multi-Factor-Based Balance #466

Merged
merged 2 commits into from
Jun 11, 2024
Merged

Conversation

djshow832
Copy link
Collaborator

What problem does this PR solve?

Issue Number: ref #465

Problem Summary:

It may be inefficient to merely balance based on health and connection counts:

  • The workload of each connection may be different: some may be busy while others may be idle. We have seen cases when connection counts are balanced while CPU usage is not.
  • When some big queries make a TiDB OOM, all the connections on the TiDB are disconnected. Actually, connections without big queries have a chance to be migrated away before the TiDB fails.
  • In multi-AZ deployment, the cross-AZ traffic between TiProxy and TiDB may lead to significant fees. It's more cost-effective for TiProxy to route to the local TiDB preferentially.

What is changed and how it works:

Proposes an RFC to balance TiDB instances based on more factors to maximize resource usage and reduce costs.

Some details are TBD, but the rough design is done.

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

Notable changes

  • Has configuration change
  • Has HTTP API interfaces change
  • Has tiproxyctl change
  • Other user behavior changes

Release note

Please refer to Release Notes Language Style Guide to write a quality release note.

None

@ti-chi-bot ti-chi-bot bot requested review from bb7133 and xhebox February 1, 2024 03:20
@ti-chi-bot ti-chi-bot bot added the size/L label Feb 1, 2024
@djshow832 djshow832 mentioned this pull request Apr 19, 2024
28 tasks
@codecov-commenter
Copy link

codecov-commenter commented Jun 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (main@5848e2e). Learn more about missing BASE report.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #466   +/-   ##
=======================================
  Coverage        ?   67.22%           
=======================================
  Files           ?       76           
  Lines           ?     6886           
  Branches        ?        0           
=======================================
  Hits            ?     4629           
  Misses          ?     1919           
  Partials        ?      338           
Flag Coverage Δ
unit 67.22% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

ti-chi-bot bot commented Jun 11, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-06-11 02:13:27.033300498 +0000 UTC m=+430761.086612426: ☑️ agreed by xhebox.

@xhebox
Copy link
Collaborator

xhebox commented Jun 11, 2024

/hold

Copy link

ti-chi-bot bot commented Jun 11, 2024

@joey-yez: adding LGTM is restricted to approvers and reviewers in OWNERS files.

In response to this:

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Copy link

ti-chi-bot bot commented Jun 11, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: joey-yez, xhebox

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@djshow832
Copy link
Collaborator Author

/unhold

@ti-chi-bot ti-chi-bot bot merged commit 00fb1b3 into pingcap:main Jun 11, 2024
5 checks passed
@djshow832 djshow832 deleted the multi_factor branch June 11, 2024 02:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants