惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Help Net Security
Help Net Security
G
Google Developers Blog
雷峰网
雷峰网
WordPress大学
WordPress大学
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Engineering at Meta
Engineering at Meta
Security Latest
Security Latest
T
Threat Research - Cisco Blogs
AWS News Blog
AWS News Blog
F
Full Disclosure
C
Cybersecurity and Infrastructure Security Agency CISA
T
The Exploit Database - CXSecurity.com
J
Java Code Geeks
U
Unit 42
C
Cyber Attacks, Cyber Crime and Cyber Security
V
V2EX
C
Cisco Blogs
博客园 - 司徒正美
Project Zero
Project Zero
L
LINUX DO - 热门话题
阮一峰的网络日志
阮一峰的网络日志
Blog — PlanetScale
Blog — PlanetScale
Scott Helme
Scott Helme
A
About on SuperTechFans
Hugging Face - Blog
Hugging Face - Blog
S
Securelist
小众软件
小众软件
aimingoo的专栏
aimingoo的专栏
S
Schneier on Security
G
GRAHAM CLULEY
酷 壳 – CoolShell
酷 壳 – CoolShell
Cyberwarzone
Cyberwarzone
MongoDB | Blog
MongoDB | Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - 叶小钗
T
Threatpost
Recorded Future
Recorded Future
C
CXSECURITY Database RSS Feed - CXSecurity.com
宝玉的分享
宝玉的分享
N
News and Events Feed by Topic
人人都是产品经理
人人都是产品经理
The Register - Security
The Register - Security
S
Security Archives - TechRepublic
博客园 - Franky
N
News | PayPal Newsroom
Simon Willison's Weblog
Simon Willison's Weblog
S
SegmentFault 最新的问题
W
WeLiveSecurity
A
Arctic Wolf
B
Blog

博客园 - ph580

国外大牛开发者创造出Siri第三方服务器 HTML5 开发者需要了解的技巧你要知道的知识 VS2008几大新功能描述如下 VS2008和.NET Framework 3.5功能与区别特性 竞争情报的战略与战术运用会让公司得利 为何中国企业在同一个问题上跌倒 开发嵌入式WEB的网络视频监控系统,设计思路 LightSwitch数据源开发小例 SQL server 2005 master数据库进行轻型的恢复备份操作 C#多线程窗体控件安全访问实现方法 安全、简单的Windows Forms多线程编程实现 如何下手进行高效的c#线程池设计 C#编程开发 Berkeley DB SQL使用方法 装箱和拆箱(什么是装箱和拆箱) C#基础 - ph580 WCF中使用SoapHeader进行验证实现方法总结 JavaScript 正则表达式解析常用方法 C#正则表达式无法识别双引号解决 ASP.NET服务器控件开发之实现事件分析 Asp.net控件开发学习之数据回传小节
Amoeba新版本如何与MYSQL读写分离配置
ph580 · 2011-07-27 · via 博客园 - ph580
  • <?xml version="1.0" encoding="gbk"?>

    <!DOCTYPE amoeba:dbServers SYSTEM "dbserver.dtd">

    <amoeba:dbServers xmlns:amoeba="http://amoeba.meidusa.com/">

        <!--

        

          Each dbServer needs to be configured into a Pool,

          If you need to configure multiple dbServer with load balancing that can be simplified by the following configuration:

            add attribute with name virtual = "true" in dbServer, but the configuration does not allow the element with name factoryConfig

            such as 'multiPool' dbServer        

    -->

    <dbServer name="abstractServer" abstractive="true">

    <factoryConfig class="com.meidusa.amoeba.mysql.net.MysqlServerConnectionFactory">

    <property name="manager">${defaultManager}</property>

    <property name="sendBufferSize">64</property>

    <property name="receiveBufferSize">128</property>

          <!--

    mysql port -->

    <property name="port">3306</property>

          <!--

    mysql schema -->

    <property name="schema">test</property>

          <!--

    mysql user -->

    <property name="user">root</property>

          <!--

        mysql password -->

    <property name="password">123456</property>

    </factoryConfig>

    <poolConfig class="com.meidusa.amoeba.net.poolable.PoolableObjectPool">

    <property name="maxActive">500</property>

    <property name="maxIdle">500</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="server1"    parent="abstractServer">

    <factoryConfig>

          <!--

    mysql ip -->

    <property name="ipAddress">192.168.2.11</property>

    </factoryConfig>

    </dbServer>

          <!--

    ########################把如上的内容复制到下面,来增加SERVER2############################ -->

    <dbServer name="abstractServer" abstractive="true">

    <factoryConfig class="com.meidusa.amoeba.mysql.net.MysqlServerConnectionFactory">

    <property name="manager">${defaultManager}</property>

    <property name="sendBufferSize">64</property>

    <property name="receiveBufferSize">128</property>

          <!--

    mysql port -->

    <property name="port">3306</property>

          <!--

    mysql schema -->

    <property name="schema">test</property>

          <!--

    mysql user -->

    <property name="user">root</property>

    <property name="password">123456</property>

    </factoryConfig>

    <poolConfig class="com.meidusa.amoeba.net.poolable.PoolableObjectPool">

    <property name="maxActive">500</property>

    <property name="maxIdle">500</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"    parent="abstractServer">

    <factoryConfig>

          <!--

    mysql ip -->

    <property name="ipAddress">192.168.2.13</property>

    </factoryConfig>

    </dbServer>

    <dbServer name="multiPool" virtual="true">

    <poolConfig class="com.meidusa.amoeba.server.MultipleServerPool">

          <!--

    Load balancing strategy: 1=ROUNDROBIN , 2=WEIGHTBASED , 3=HA-->

    <property name="loadbalance">1</property>

          <!--

    Separated by commas,such as: server1,server2,server1 -->

    <property name="poolNames">server1</property>

    </poolConfig>

    </dbServer>

    </amoeba:dbServers>