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

<dble:db xmlns:dble="http://dble.cloud/" version="4.0">
    <dbGroup name="dbGroup1" rwSplitMode="2" delayThreshold="100">
        <heartbeat>show slave status</heartbeat>
        <dbInstance name="instanceM1" url="ip1:3306" user="your_user" password="your_psw" maxCon="1000" minCon="10"
                    primary="true" readWeight="1" id="xx1">
            <property name="testWhileIdle">true</property>
        </dbInstance>
        <!--<dbInstance name="instanceS1" url="ip3:3306" user="your_user" password="your_psw" maxCon="1000" minCon="10"  readWeight="2" disabled="true">-->
            <!--<property name="testWhileIdle">false</property>-->
        <!--</dbInstance>-->
    </dbGroup>

    <dbGroup name="dbGroup2" rwSplitMode="0" delayThreshold="100" disableHA="true">
        <heartbeat errorRetryCount="1" timeout="10" keepAlive="60">show slave status</heartbeat>
        <dbInstance name="instanceM2" url="ip2:3306" user="your_user" password="your_psw" maxCon="1000" minCon="10"
                    primary="true">
            <property name="testWhileIdle">true</property>
        </dbInstance>

        <!-- can have multi read instances -->
        <!--<dbInstance name="instanceS2" url="ip4:3306" user="your_user" password="your_psw" maxCon="1000" minCon="10" usingDecrypt="true">-->
            <!--<property name="testWhileIdle">true</property>-->
        <!--</dbInstance>-->
    </dbGroup>
    <!--for clickhouse-->
    <dbGroup name="dbGroup3" rwSplitMode="0" delayThreshold="100" disableHA="true">
        <heartbeat errorRetryCount="1" timeout="10" keepAlive="60">show databases</heartbeat>
        <dbInstance name="instanceM2" url="ip2:9004" user="your_user" password="your_psw" maxCon="1000" minCon="10" databaseType="clickhouse"
                    primary="true">
            <property name="testWhileIdle">true</property>
        </dbInstance>
        <!-- can have multi read instances -->
        <!--<dbInstance name="instanceS2" url="ip4:9004" user="your_user" password="your_psw" maxCon="1000" minCon="10" usingDecrypt="true" databaseType="clickhouse">-->
        <!--<property name="testWhileIdle">true</property>-->
        <!--</dbInstance>-->
    </dbGroup>
</dble:db>