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

[Feat] support slb connection rebalance in ODP mode #123

Merged
merged 4 commits into from
Oct 19, 2023

Conversation

shenyunlong
Copy link
Contributor

Summary

support SLB LoadBalance and MaxConnectionAge in ODP mode

Solution Description

supply two configuration item to support connection balance in ODP mode(i.e. this two configuration item only works in ODP mode):

  1. MaxConnectionAge: the maximum survival time of connection in table client, after connections expired, client will reconnect these expired connections in smooth
  2. EnableSLBLoadBalance: if this option set to true, which means client will get SLB addresses from DNS, and monitor the change of SLB addresses from DNS, every connection is connect to one SLB address directly in round-robin way, when SLB addresses changed, client will reconnect according to new SLB addresses

Copy link
Contributor

@IHEII IHEII left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Almost there :D

main/main.go Outdated Show resolved Hide resolved
obkvrpc/connection_pool.go Outdated Show resolved Hide resolved
obkvrpc/connection_pool.go Show resolved Hide resolved
obkvrpc/connection_pool.go Outdated Show resolved Hide resolved
obkvrpc/connection_pool.go Show resolved Hide resolved
obkvrpc/connection_pool.go Outdated Show resolved Hide resolved
obkvrpc/connection_pool.go Outdated Show resolved Hide resolved
obkvrpc/connection_pool.go Outdated Show resolved Hide resolved
obkvrpc/connection_pool.go Outdated Show resolved Hide resolved
@shenyunlong shenyunlong force-pushed the LoadBalance branch 2 times, most recently from 53550fa to 2396f1d Compare October 17, 2023 13:54
@WeiXinChan
Copy link
Contributor

LGTM

1 similar comment
@IHEII
Copy link
Contributor

IHEII commented Oct 18, 2023

LGTM

@IHEII IHEII merged commit e192eae into oceanbase:main Oct 19, 2023
1 check passed
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

Successfully merging this pull request may close these issues.

3 participants