Coder Social home page Coder Social logo

hoangdh / ghichep-ha Goto Github PK

View Code? Open in Web Editor NEW
21.0 4.0 32.0 435 KB

Ghi chép tổng quan về giải pháp High Availability cho Web Server, Databases,...

Shell 100.00%
galera load-balancer haproxy pacemaker corosync nginx-load-balance failover cluster

ghichep-ha's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

ghichep-ha's Issues

Trạng Thái Node02 Stoped

image

Đức cũng cấu hình như bạn vậy như mà không hiểu sao con Node02 trạng thái Stoped thay vì như bạn là Slave

image

Ghi chép thô cách cài đặt MaxScale trên CentOS 7 cho MariaDB

Cau hinh maxscale tren CentOS 7

  • Tren Galera, them user:

Quan tri tu xa

CREATE USER 'root'@'%' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%';
FLUSH PRIVILEGES;

User cho maxscale

CREATE USER 'maxscale'@'%' IDENTIFIED BY 'you-password-here';
GRANT SELECT ON mysql.db TO 'maxscale'@'%';
GRANT SELECT ON mysql.user TO 'maxscale'@'%';
GRANT SHOW DATABASES ON *.* TO 'maxscale'@'%';
  • Cai dat
wget https://downloads.mariadb.com/MaxScale/latest/centos/7/x86_64/maxscale-2.0.5-1.centos.7.x86_64.rpm

yum install -y maxscale-*

Cau hinh

mv /etc/maxscale.cnf /etc/maxscale.cnf.bk

vi /etc/maxscale.cnf

Noi dung file cau hinh

[maxscale]
threads=4
syslog=0
maxlog=1
log_to_shm=1
log_warning=1
log_notice=1
log_info=0
log_debug=0

[Galera Monitor]
type=monitor
module=galeramon
servers=server1,server2,server3
user=maxscale
passwd=you-password-here
monitor_interval=2000
disable_master_failback=1
available_when_donor=1

[qla]
type=filter
module=qlafilter
options=/tmp/QueryLog

[fetch]
type=filter
module=regexfilter
match=fetch
replace=select

[RW Split Router]
type=service
router=readwritesplit
servers=server1,server2,server3
user=maxscale
passwd=you-password-here
max_slave_connections=100%
max_slave_replication_lag=30

[CLI]
type=service
router=cli

[RW Split Listener]
type=listener
service=RW Split Router
protocol=MySQLClient
port=3306

[CLI Listener]
type=listener
service=CLI
protocol=maxscaled
address=127.0.0.1
port=6603

[server1]
type=server
address=192.168.100.140
port=3306
protocol=MySQLBackend

[server2]
type=server
address=192.168.100.141
port=3306
protocol=MySQLBackend

[server3]
type=server
address=192.168.100.142
port=3306
protocol=MySQLBackend

Tham khảo:

https://linoxide.com/cluster/configure-mariadb-maxscale-galera-cluster/

Cách thêm VIP cùng hoạt động trên các máy chủ

Tạo tài nguyên VIP mới

pcs resource create vip2 ocf:heartbeat:IPaddr2 ip="X.X.X.X" cidr_netmask="24" nic="ethX" op monitor interval="30s"

Thêm tùy chọn nic="ethX": Chỉ định NIC lắng nghe

Tạo clone tài nguyên

pcs resource master vip2-clone vip2 master-max=1 master-node-max=1 clone-max=2 clone-node-max=1 notify=true

Bonus: Thay đổi địa chỉ VIP

pcs resource update vip2 IPAddr ip=192.168.2.200 cidr_netmask=24 op monitor interval=30s

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.