-
Notifications
You must be signed in to change notification settings - Fork 217
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] read-write separation enhancements #624
Comments
ACK |
zhyass
added a commit
to zhyass/radon
that referenced
this issue
May 8, 2020
[summary] 1.config Add 'replica-address' to backend config, identify read-only backends vip. Add 'loadbalance' to proxy config, 0 -- disable balance, 1 -- enable balance to replica. 2.When the statement is read and not in a multi-statement transaction, the sql is sent to the 'replica-address' for execution. [test case] src/backend/pool_test.go src/backend/queryz_test.go src/backend/txn_test.go src/backend/txnmgr_test.go src/proxy/proxy_test.go [patch codecov] src/backend/mock.go 98.8% src/backend/pool.go 90.9% src/backend/txn.go 89.1% src/backend/txnmgr.go 88.5% src/proxy/proxy.go 86.0%
zhyass
added a commit
to zhyass/radon
that referenced
this issue
May 8, 2020
[summary] 1.config Add 'replica-address' to backend config, identify read-only backends vip. Add 'loadbalance' to proxy config, 0 -- disable balance, 1 -- enable balance to replica. 2.When the statement is read and not in a multi-statement transaction, the sql is sent to the 'replica-address' for execution. [test case] src/backend/pool_test.go src/backend/queryz_test.go src/backend/txn_test.go src/backend/txnmgr_test.go src/proxy/proxy_test.go [patch codecov] src/backend/mock.go 98.8% src/backend/pool.go 90.9% src/backend/txn.go 89.1% src/backend/txnmgr.go 88.5% src/proxy/proxy.go 86.0%
zhyass
added a commit
to zhyass/radon
that referenced
this issue
May 8, 2020
[summary] 1.config Add 'replica-address' to backend config, identify read-only backends vip. Add 'loadbalance' to proxy config, 0 -- disable balance, 1 -- enable balance to replica. 2.When the statement is read and not in a multi-statement transaction, the sql will sent to the 'replica-address' for execution. [test case] src/backend/pool_test.go src/backend/queryz_test.go src/backend/txn_test.go src/backend/txnmgr_test.go src/proxy/proxy_test.go [patch codecov] src/backend/mock.go 98.8% src/backend/pool.go 90.9% src/backend/txn.go 89.1% src/backend/txnmgr.go 88.5% src/proxy/proxy.go 86.0%
zhyass
added a commit
to zhyass/radon
that referenced
this issue
May 9, 2020
[summary] 1.api Add 'replica-address' to `/v1/radon/backend`. Add 'loadbalance' to `/v1/radon/config`. [test case] src/ctl/v1/backend_test.go src/ctl/v1/radon_test.go [patch codecov] src/ctl/v1/backend.go 87.8% src/ctl/v1/radon.go 92.6%
zhyass
added a commit
to zhyass/radon
that referenced
this issue
May 9, 2020
[summary] 1.config Add 'replica-address' to backend config, identify read-only backends vip. Add 'loadbalance' to proxy config, 0 -- disable balance, 1 -- enable balance to replica. 2.When the statement is read and not in a multi-statement transaction, the sql will sent to the 'replica-address' for execution. [test case] src/backend/pool_test.go src/backend/queryz_test.go src/backend/txn_test.go src/backend/txnmgr_test.go src/proxy/proxy_test.go [patch codecov] src/backend/mock.go 98.8% src/backend/pool.go 90.9% src/backend/txn.go 89.1% src/backend/txnmgr.go 88.5% src/proxy/proxy.go 86.0%
zhyass
added a commit
to zhyass/radon
that referenced
this issue
May 9, 2020
[summary] 1.api Add 'replica-address' to `/v1/radon/backend`. Add 'loadbalance' to `/v1/radon/config`. [test case] src/ctl/v1/backend_test.go src/ctl/v1/radon_test.go [patch codecov] src/ctl/v1/backend.go 87.8% src/ctl/v1/radon.go 92.6%
zhyass
added a commit
to zhyass/radon
that referenced
this issue
May 9, 2020
[summary] 1.config Add 'replica-address' to backend config, identify read-only backends vip. Add 'loadbalance' to proxy config, 0 -- disable balance, 1 -- enable balance to replica. 2.When the statement is read and not in a multi-statement transaction, the sql will sent to the 'replica-address' for execution. [test case] src/backend/pool_test.go src/backend/queryz_test.go src/backend/txn_test.go src/backend/txnmgr_test.go src/proxy/proxy_test.go [patch codecov] src/backend/mock.go 98.8% src/backend/pool.go 90.9% src/backend/txn.go 89.1% src/backend/txnmgr.go 88.5% src/proxy/proxy.go 86.0%
zhyass
added a commit
to zhyass/radon
that referenced
this issue
May 9, 2020
[summary] 1.api Add 'replica-address' to `/v1/radon/backend`. Add 'loadbalance' to `/v1/radon/config`. [test case] src/ctl/v1/backend_test.go src/ctl/v1/radon_test.go [patch codecov] src/ctl/v1/backend.go 87.8% src/ctl/v1/radon.go 92.6%
BohuTANG
added a commit
that referenced
this issue
May 9, 2020
*: support read-write separation #624
zhyass
added a commit
to zhyass/radon
that referenced
this issue
May 9, 2020
[summary] The query with '/*+loadbalance*/' will be forced to execute on normal, which means loadbalance'll be disabled. select /*+ loadbalance */ ... [test case] src/backend/txn_test.go src/proxy/execute_test.go [patch codecov] src/backend/txn.go 88.8% src/proxy/execute.go 87.6%
zhyass
added a commit
to zhyass/radon
that referenced
this issue
May 9, 2020
[summary] The query with '/*+loadbalance*/' will be forced to execute on normal, which means loadbalance'll be disabled. select /*+ loadbalance */ ... [test case] src/backend/txn_test.go src/proxy/execute_test.go [patch codecov] src/backend/txn.go 89.1% src/proxy/execute.go 87.8%
zhyass
added a commit
to zhyass/radon
that referenced
this issue
May 9, 2020
[summary] The query with '/*+loadbalance*/' will be forced to execute on normal, which means loadbalance'll be disabled. select /*+ loadbalance */ ... [test case] src/backend/txn_test.go src/proxy/execute_test.go [patch codecov] src/backend/txn.go 89.1% src/proxy/execute.go 87.8%
zhyass
added a commit
to zhyass/radon
that referenced
this issue
May 9, 2020
[summary] update api.md and radon_sql_support.md docs. [test case] N/A [patch codecov] N/A
zhyass
added a commit
to zhyass/radon
that referenced
this issue
May 9, 2020
[summary] The query with '/*+loadbalance=0*/' will be forced to execute on normal, which means loadbalance'll be disabled. [test case] src/backend/txn_test.go src/proxy/execute_test.go [patch codecov] src/backend/txn.go 89.1% src/proxy/execute.go 87.8%
zhyass
added a commit
to zhyass/radon
that referenced
this issue
May 9, 2020
[summary] update api.md and radon_sql_support.md docs. [test case] N/A [patch codecov] N/A
zhyass
added a commit
to zhyass/radon
that referenced
this issue
May 9, 2020
[summary] update api.md and radon_sql_support.md docs. [test case] N/A [patch codecov] N/A
zhyass
added a commit
to zhyass/radon
that referenced
this issue
May 10, 2020
[summary] 1. When the query is Select and not in multi-statement, the config load-balance can take effect. 2. By using hint can directly decide the load-balance mode, instead of check ProxyConfig. [test case] src/backend/txn_test.go src/proxy/execute_test.go [patch codecov] src/backend/txn.go 89.1% src/proxy/execute.go 87.8%
zhyass
added a commit
to zhyass/radon
that referenced
this issue
May 10, 2020
[summary] update api.md and radon_sql_support.md docs. [test case] N/A [patch codecov] N/A
BohuTANG
added a commit
that referenced
this issue
May 11, 2020
*: add hint for read-write separation #624
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Summary
Now all reads and writes are sent to the backend mysql master node, and in some scenarios (which requires weak data consistency), we can route the reads to the slave node.
replica-address
to backend config, identify read-only backends vipProxyConfig
addbalance
: 0 -- disable balance, 1 -- enable balance to replicaadd
replicaConnections
in https://github.com/radondb/radon/blob/master/src/backend/txn.go#L98check the query, if it is read¬-in-multi-statement txn, txn will fetch a connection from
replicaConnections
and executes.API:
Add and remove replica nodes or setting balance mode
Hint:
Add
/*+ balance=0 */
to force execution onaddress
(write nodes).The text was updated successfully, but these errors were encountered: