redis集群-中间件amoeba配置文件

2022-09-19 11:03:24 浏览数 (2)

代码语言:javascript复制
<?xml version="1.0" encoding="gbk"?>

<!DOCTYPE amoeba:configuration SYSTEM "amoeba.dtd">
<amoeba:configuration xmlns:amoeba="http://amoeba.meidusa.com/">

	<server>
		<property name="port">8066</property>
		<property name="ipAddress">192.168.3.43</property>
		<property name="readThreadPoolSize">20</property>
		<property name="clientSideThreadPoolSize">30</property>
		<property name="serverSideThreadPoolSize">30</property>
		<property name="netBufferSize">128</property>
		<property name="tcpNoDelay">true</property>
		<property name="user">amoebaroot</property>
		<property name="password">123456</property>
		<property name="queryTimeout">60</property>
	</server>
	<connectionManagerList>
		<connectionManager name="defaultManager" class="com.meidusa.amoeba.net.MultiConnectionManagerWrapper">
			<property name="subManagerClassName">com.meidusa.amoeba.net.AuthingableConnectionManager</property>
			<property name="processors">5</property>
		</connectionManager>
	</connectionManagerList>
	<dbServerList>
		<dbServer name="server1">
			<factoryConfig class="com.meidusa.amoeba.mysql.net.MysqlServerConnectionFactory">
				<property name="manager">defaultManager</property>
				<property name="port">3306</property>
				<property name="ipAddress">192.168.3.13</property>
				<property name="schema">hf2204</property>
				<property name="user">amoebauser</property>
				<property name="password">123456</property>
			</factoryConfig>
			<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>
		<dbServer name="server2">
			<factoryConfig class="com.meidusa.amoeba.mysql.net.MysqlServerConnectionFactory">
				<property name="manager">defaultManager</property>
				<property name="port">3306</property>
				<property name="ipAddress">192.168.3.23</property>
				<property name="schema">hf2204</property>
				<property name="user">amoebauser</property>
				<property name="password">123456</property>
			</factoryConfig>
			<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>
		<dbServer name="server3">
			<factoryConfig class="com.meidusa.amoeba.mysql.net.MysqlServerConnectionFactory">
				<property name="manager">defaultManager</property>
				<property name="port">3306</property>
				<property name="ipAddress">192.168.3.33</property>
				<property name="schema">hf2204</property>
				<property name="user">amoebauser</property>
				<property name="password">123456</property>
			</factoryConfig>
			<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>
		<dbServer name="WP" virtual="true">
			<poolConfig class="com.meidusa.amoeba.server.MultipleServerPool">
				<property name="loadbalance">1</property>
				<property name="poolNames">server1</property>
			</poolConfig>
		</dbServer>
		<dbServer name="RP" virtual="true">
			<poolConfig class="com.meidusa.amoeba.server.MultipleServerPool">
				<property name="loadbalance">1</property>
				<property name="poolNames">server2,server3</property>
			</poolConfig>
		</dbServer>
		
	</dbServerList>
	
	<queryRouter class="com.meidusa.amoeba.mysql.parser.MysqlQueryRouter">
		<property name="ruleConfig">${amoeba.home}/conf/rule.xml</property>
		<property name="functionConfig">${amoeba.home}/conf/functionMap.xml</property>
		<property name="ruleFunctionConfig">${amoeba.home}/conf/ruleFunctionMap.xml</property>
		<property name="LRUMapSize">1500</property>
		<property name="defaultPool">WP</property>
		<property name="writePool">WP</property>
		<property name="readPool">RP</property>
		<property name="needParse">true</property>
	</queryRouter>
</amoeba:configuration>

0 人点赞