Data segmentation with Amoeba MySQL read-write separation

Source: Internet
Author: User
Tags cdata

(3) using amoeba to achieve data segmentation, higher level of read and write separation

continue from above the use of amoeba to achieve read and write separation configured for re-configuration:

(client,proxy,two master,two slave Server at least 6 virtual machines)


Split horizontally: Store key fields on a specific algorithm to different servers
Vertical Segmentation: Save data to different servers by business difference

650) this.width=650; "src=" "alt=" Qq20150724154840.png "/>

split Horizontally

# cd/usr/local/amoeba/conf/

# Vim Rule.xml

stu table under #sxjy database # See master1,2 is horizontal split

<tablerule name= "Stu" schema= "Sxjy " defaultpools= "Master1,master2" >
<rule name= "Rule1" >
<expression><! [cdata[id% 2 = = 0]]></expression>
<rule name= "Rule2" >
<expression><! [cdata[id% 2 = = 1]]></expression>
Vertical Split
<tablerule name= "user_info" schema= "blog" defaultpools= " master1"/>
<tablerule name= "User_info" schema= "webchat" defaultpools= "Master2"/>

This article is from the "Zhanglulu" blog, make sure to keep this source

Data segmentation with Amoeba MySQL read-write separation

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.