Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to configure the new version of Amoeba MYSQL read-write separation

2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

Editor to share with you the new version of Amoeba MYSQL read-write separation how to configure, I hope you will learn something after reading this article, let's discuss it together!

Official introduction

Amoeba means amoeba in Chinese.

The main solution is:

Reduce the complex multi-database structure brought by data segmentation

Provide segmentation rules and reduce the impact of data segmentation rules on applications

Reduce the number of connections between db and the client

Separation of reading and writing

A brief personal description

Maybe you don't understand what the damn thing Amoebla is mainly doing! For example, it is well known in the PHP environment that PHP does not have a data connection pool, so it will jump if the MYSQL traffic is heavy in the PHP environment, unless you configure a Cluster cluster, and Amoeba acts as a buffer between PHP programs and MYSQL.

Preparatory work

Server:192.168.1.208 # Amoeba

Server:192.168.1.11 # NDBD1 (Master)

Server:1921.68.1.13 # NDBD2 (from)

Note: please install MYSQL one-way step in advance on 11 and 13 servers.

Please also install MYSQL version 5.1 or above, because the new version of Amoeba2.10 is unstable for versions below 5.1.

Structure diagram

Step 1: configure Amoeba192.168.2.8 read-write separation

1: extract the installation package

[root@Management down] # mkdir / usr/local/amoeba

[root@Management down] # tar-zxf amoeba-mysql-binary-2.1.0-RC5.tar.gz-C / usr/local/amoeba/

2: enter the configuration directory and browse the file

[root@Management down] # cd / usr/local/amoeba/

[root@Management amoeba] # ll

Total 88

Drwxr-xr-x 2 root root 4096 Jul 26 11:57 benchmark

Drwxr-xr-x 2 root root 4096 Feb 28 09:25 bin

-rw-r--r-- 1 root root 3983 May 18 13:43 changelogs.txt

Drwxr-xr-x 2 root root 4096 Jul 26 11:57 conf

Drwxr-xr-x 3 root root 4096 Jul 26 11:57 lib

-rw-r--r-- 1 root root 34520 May 18 13:43 LICENSE.txt

-rw-r--r-- 1 root root 2031 May 18 13:43 README.html

3: enter the main configuration file directory

[root@Management amoeba] # cd conf/

[root@Management conf] # ls

Access_list.conf amoeba.xml dbServers.xml functionMap.xml log4j.xml ruleFunctionMap.xml

Amoeba.dtd dbserver.dtd function.dtd log4j.dtd rule.dtd rule.xml

Here I mainly introduce the configuration of three main configuration files: amoeba.xml, dbServers.xml and log4j.xml. Other files can be seized by default without special needs.

4:vi amoeba.xml modifies the main configuration file

4.1) change the default port 8066 to 3306

3066

4.2) change the default connection username and password to your own

Sky

123456

Change the default number of client threads, requests and server responses to 200300300

two hundred

three hundred

three hundred

7: performance optimization, open bin/amoeba

DEFAULT_OPTS= "- server-Xms256m-Xmx256m-Xss128k"

Change to

DEFAULT_OPTS= "- server-Xms512m-Xmx512m-Xmn100m-Xss1204k"

8: start amoeba

Nohup / usr/local/amoeba/bin/amoeba start 2 > & 1 > / dev/null &

After reading this article, I believe you have a certain understanding of "how to configure the new version of Amoeba MYSQL read-write separation". If you want to know more about it, you are welcome to follow the industry information channel. Thank you for reading!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report