<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright (C) 2016-2023 ActionTech.
  ~ License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher.
  -->

<!--
 -  
 - Licensed under the Apache License, Version 2.0 (the "License");
 - you may not use this file except in compliance with the License.
 - You may obtain a copy of the License at
 -  
 -      http://www.apache.org/licenses/LICENSE-2.0
 -  
 - Unless required by applicable law or agreed to in writing, software
 - distributed under the License is distributed on an "AS IS" BASIS,
 - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 - See the License for the specific language governing permissions and
 - limitations under the License.
-->
<dble:db xmlns:dble="http://dble.cloud/">

    <dbGroup name="localhost1" rwSplitMode="0">
        <heartbeat>select user()</heartbeat>
        <dbInstance name="hostM1" url="localhost:3306" user="root"
                    password="123456" maxCon="500" minCon="10" primary="true">
        </dbInstance>
    </dbGroup>


    <!-- 读权重设置 -->
    <dbGroup name="localhost2" rwSplitMode="0" delayThreshold="100">
        <heartbeat>select user()</heartbeat>
        <dbInstance name="writeS" url="192.168.1.10:3306" user="root" password="123456" maxCon="1000" minCon="10"
                    primary="true">
            <!-- can have multi read hosts -->

        </dbInstance>
        <dbInstance name="readS1" url="192.168.1.11:3306" user="root" password="123456" readWeight="1" maxCon="1000"
                    minCon="10"/>
        <dbInstance name="readS2" url="192.168.1.12:3306" user="root" password="123456" readWeight="2" maxCon="1000"
                    minCon="10"/>
        <dbInstance name="readS3" url="192.168.1.13:3306" user="root" password="123456" readWeight="3" maxCon="1000"
                    minCon="10"/>
    </dbGroup>

</dble:db>
