How to test whether Amoeba has achieved Load Balancing

Source: Internet
Author: User

As we all know, in the mmm environment, the data in each database is consistent. What you see after amoeba is consistent is that the Server Load balancer has been used, and you cannot see it.

So what should we do? Here we can use a parameter in/etc/my. cnf to implement replicate_ignore_db = test

After this parameter is added, You can restart the database to ensure that the test database does not synchronize with the test database of other databases in this database. Therefore, you can create one database and assume that you have four databases:

Master1 master2 slave1 slave2 is ready for mmm

Then you can

1. log on to master2 vim/etc/my. cnf and add replicate_ignore_db = test to restart the database.

2. log on to mysql in master1 and create a t table> use test; create table t (this varchar (10); insert into t values ('m1 '); quit;

Vim/etc/my. cnf add replicate_ignore_db = test to restart the database

3. log on to master2; mysql> use test;

> Create table t (this varchar (10); insert into t values ('m2 '); quit;

4. log on to slave1; vim/etc/my. cnf and add replicate_ignore_db = test to restart the database.

5. log on to master2; mysql> use test; insert into t values ('m1m2iss2 '); quit;

In this way, the data in the t table will be different.

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: info-contact@alibabacloud.com 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.