<?xml version="1.0" encoding="gbk"?>
<!DOCTYPE amoeba:configuration SYSTEM "amoeba.dtd">
<amoeba:configuration xmlns:amoeba="http://amoeba.meidusa.com/">
<server>
<!-- proxy server
綁定的端口 -->
<property name="port">8066</property>
<!-- proxy server
綁定的IP -->
<property name="ipAddress">10.10.0.87</property>
<!-- proxy server net IO Read thread size -->
<property name="readThreadPoolSize">20</property>
<!-- proxy server client process thread size -->
<property name="clientSideThreadPoolSize">30</property>
<!-- mysql server data packet process thread size -->
<property name="serverSideThreadPoolSize">30</property>
<!-- socket Send and receive BufferSize(unit:K) -->
<property name="netBufferSize">128</property>
<!-- Enable/disable TCP_NODELAY (disable/enable Nagle's algorithm). -->
<property name="tcpNoDelay">true</property>
<!--
對外驗證的用戶名 -->
<property name="user">root</property>
<!--
對外驗證的密碼 -->
<property name="password">sxit</property>
<!-- query timeout( default: 60 second , TimeUnit:second) -->
<property name="queryTimeout">60</property>
</server>
<!--
每一個ConnectionManager都將做爲一個線程啓動。
manager
負責Connection IO讀寫/死亡檢測
-->
<connectionManagerList>
<connectionManager name="defaultManager" class="com.meidusa.amoeba.net.MultiConnectionManagerWrapper">
<property name="subManagerClassName">com.meidusa.amoeba.net.AuthingableConnectionManager
</property>
<!--
default value is avaliable Processors
<property name="processors">5</property>
-->
</connectionManager>
</connectionManagerList>
<dbServerList>
<!--
一臺mysqlServer 須要配置一個pool,
若是多臺 平等的mysql須要進行loadBalance,
平臺已經提供一個具備負載均衡能力的objectPool:com.meidusa.amoeba.mysql.server.MultipleServerPool
簡單的配置是屬性加上 virtual="true",該Pool 不容許配置factoryConfig
或者本身寫一個ObjectPool。
-->
<dbServer name="server1">
<!-- PoolableObjectFactory
實現類 -->
<factoryConfig class="com.meidusa.amoeba.mysql.net.MysqlServerConnectionFactory">
<property name="manager">defaultManager</property>
<!--
真實mysql數據庫端口 -->
<property name="port">3306</property>
<!--
真實mysql數據庫IP -->
<property name="ipAddress">10.10.0.72</property>
<property name="schema">test</property>
<!--
用於登錄mysql的用戶名 -->
<property name="user">test</property>
<!--
用於登錄mysql的密碼 -->
<property name="password">123456</property>
</factoryConfig>
<!-- ObjectPool
實現類 -->
<poolConfig class="com.meidusa.amoeba.net.poolable.PoolableObjectPool">
<property name="maxActive">200</property>
<property name="maxIdle">200</property>
<property name="minIdle">10</property>
<property name="minEvictableIdleTimeMillis">600000
</property>
<property name="timeBetweenEvictionRunsMillis">600000</property>
<property name="testOnBorrow">true</property>
<property name="testWhileIdle">true</property>
</poolConfig>
</dbServer>