-
Notifications
You must be signed in to change notification settings - Fork 19
Configuration
Yang Shuang edited this page Oct 28, 2022
·
3 revisions
<? xml version="1.0" encoding="utf-8" ?>
<ALL>
<VERSION value="2"/>
<AGENT_CONFIG AgentId="1"/>
<BUSINESS_MODULE>
<MODULE Mid="1319" Name="test1" AccessToken="000013192869b7fcc3f362a97f72c0908a92cb6d" ListenOn="0.0.0.0:12001" Backlog="500" Client_Connections="900"
Preconnect="true" Server_Connections="1" Hash="chash" Timeout="3000" ReplicaEnable="true" ModuleIDC="LF" MainReport="false" InstanceReport="false" AutoRemoveReplica="true" TopPercentileEnable="false" TopPercentileDomain="127.0.0.1" TopPercentilePort="20020">
<CACHESHARDING Sid="293" ShardingReplicaEnable="true" ShardingName="test">
<INSTANCE idc="LF" Role="replica" Enable="false" Addr="127.0.0.1:20000:1"/>
<INSTANCE idc="LF" Role="master" Enable="true" Addr="dtc:20015:1"/>
</CACHESHARDING>
</MODULE>
</BUSINESS_MODULE>
<SS_MODULE port="3307" />
<LOG_MODULE LogSwitch="0" RemoteLogSwitch="1" RemoteLogIP="127.0.0.1" RemoteLogPort="9997" />
</ALL>
For One Db Server with 1 databases, and 1 table in this database.
table: &table opensource
hot:
logic:
{db: ss_log, table: *table, connection: *connection}
real:
- {addr: '11.50.77.97:3306', user: root, pwd: root, db: test}
For One Db Server with 1 databases, 4 tables in this database.
hot:
logic:
{db: ss_log, table: *table, connection: *connection}
real:
- {addr: '11.50.77.97:3306', user: root, pwd: root, db: test}
sharding:
key: *key
table: {prefix: [*table, _], start: 0, last: 4}
For One Db Server with 2 databases, 4 tables per database.
hot:
logic:
{db: ss_log, table: *table, connection: *connection}
real:
- {addr: '11.50.77.97:3306', user: root, pwd: root, db: {prefix: [test, _], start: 0, last: 1}}
sharding:
key: *key
table: {prefix: [*table, _], start: 0, last: 4}
For 2 Db Servers, 2 databases per Db server, 4 tables per database.
hot:
logic:
{db: ss_log, table: *table, connection: *connection}
real:
- {addr: '11.50.77.97:3306', user: root, pwd: root, db: {prefix: [test, _], start: 0, last: 1}}
- {addr: '11.50.77.97:3306', user: root, pwd: root, db: {prefix: [test, _], start: 2, last: 3}}
sharding:
key: *key
table: {prefix: [*table, _], start: 0, last: 4}