Comments (8)
Hi @dibrother,
Thank you for your information.
We are not embedding HAProxy in replication-manager yet. So you have to install HAProxy by yourself.
For the semi sync status we will check and fix this.
from replication-manager.
Semi sync indicator should be fixed by #658
from replication-manager.
If you wan't replication-manager to drive haproxy you need to turn on runtime_api and create a writer and reader group we are generating some config with the configurator that you could found inside the data directory under each software directory and init subdirectory
from replication-manager.
Haproxy installed using yum on 10.10.2.11
Haproxy version - 2.4.22
But it seems that the replication manager did not call it
from replication-manager.
Here is a sample of what your haproxy should look when using DNS service
In the read pool the backend name is the id of the server inside replication-manager this should be documented how to get it
global
daemon
maxconn 4096
stats socket /run/haproxy.sock mode 666 level admin
stats socket [email protected]:6032 level admin expose-fd listeners
log /dev/log local0 debug
external-check
defaults
log global
mode http
option dontlognull
option redispatch
option clitcpka
option srvtcpka
retries 3
maxconn 500000
timeout http-request 5s
timeout connect 5000ms
timeout client 50000s
timeout server 50000s
listen stats
bind 0.0.0.0:1988
mode http
stats enable
stats uri /
stats refresh 2s
stats realm Haproxy\ Stats
stats show-legends
resolvers dns
parse-resolv-conf
resolve_retries 3
timeout resolve 1s
timeout retry 1s
hold other 30s
hold refused 30s
hold nx 30s
hold timeout 30s
hold valid 10s
hold obsolete 30s
frontend my_write_frontend
bind 0.0.0.0:3306
option tcplog
mode tcp
default_backend service_write
frontend my_read_frontend
bind 0.0.0.0:3306
option tcplog
mode tcp
default_backend service_read
backend service_write
mode tcp
balance leastconn
server leader db1.bench.svc.cloud18:3306 init-addr last,libc,none resolvers dns weight 100 maxconn 2000 check inter 1000
backend service_read
mode tcp
balance leastconn
server db12445110637138812663 db1.bench.svc.cloud18:3306 init-addr last,libc,none resolvers dns weight 100 maxconn 2000 check inter 1000
server db5242879977071083029 db2.bench.svc.cloud18:3306 init-addr last,libc,none resolvers dns weight 100 maxconn 2000 check inter 1000
server db1508429827329252939 db3.bench.svc.cloud18:3306 init-addr last,libc,none resolvers dns weight 100 maxconn 2000 check inter 1000
Or using IP
global
log /dev/log local0
log /dev/log local1 notice
chroot /var/lib/haproxy
stats socket /run/haproxy/admin.sock mode 660 level admin
stats socket [email protected]:1999 level admin expose-fd listeners
stats timeout 30s
user haproxy
group haproxy
daemon
ca-base /etc/ssl/certs
crt-base /etc/ssl/private
ssl-default-bind-ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384
ssl-default-bind-ciphersuites TLS_AES_128_GCM_SHA256:TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256
ssl-default-bind-options ssl-min-ver TLSv1.2 no-tls-tickets
defaults
log global
mode http
option httplog
option dontlognull
timeout connect 5000
timeout client 50000
timeout server 50000
errorfile 400 /etc/haproxy/errors/400.http
errorfile 403 /etc/haproxy/errors/403.http
errorfile 408 /etc/haproxy/errors/408.http
errorfile 500 /etc/haproxy/errors/500.http
errorfile 502 /etc/haproxy/errors/502.http
errorfile 503 /etc/haproxy/errors/503.http
errorfile 504 /etc/haproxy/errors/504.http
listen stats
bind 0.0.0.0:1988
mode http
stats enable
stats uri /
stats refresh 2s
stats realm Haproxy\ Stats
stats show-legends
frontend my_write_frontend
bind 0.0.0.0:3306
option tcplog
mode tcp
default_backend service_write
frontend my_read_frontend
bind 0.0.0.0:3307
option tcplog
mode tcp
default_backend service_read
backend service_write
mode tcp
balance leastconn
server leader 10.0.0.41:3306 init-addr last,libc,none weight 100 maxconn 2000 check inter 1000
backend service_read
mode tcp
balance leastconn
server db9641622786185905475 <xx.xx.xx.01>:3306 init-addr last,libc,none weight 100 maxconn 2000 check inter 1000
server db7042070123332511137 <xx.xx.xx.02>:3306 init-addr last,libc,none weight 100 maxconn 2000 check inter 1000
Note that the internal id can change when you change the cluster name , the db host name or ip and the port
And the config should then be regenerate and reload
A good repman default conf to start with
[Default]
include = "/etc/replication-manager/cluster.d"
prov-orchestrator = "onpremise"
onpremise-ssh = true
onpremise-ssh-credential = "root:"
onpremise-ssh-private-key= "/root/.ssh/id_rsa"
scheduler-jobs-ssh = true
monitoring-address = "mcmetrepman01"
monitoring-ssl-cert = "/etc/replication-manager/certs/server.crt"
monitoring-ssl-key = "/etc/replication-manager/certs/server.key"
test = true
sysbench-v1 = true
compress-backups = true
backup-mysqlclient-path ="/usr/bin/mysql"
backup-mysqlbinlog-path = "/usr/bin/mysqlbinlog"
backup-mysqldump-path="/usr/bin/mysqldump"
backup-mysqldump-options = "--hex-blob --single-transaction --verbose --all-databases"
#monitoring-save-config = true
#########
## LOG ##
#########
log-file = "/var/log/replication-manager.log"
api-port = "443"
mail-from = "repman@<repmanhost>"
mail-smtp-addr = "<maillhost>:25"
mail-to = "<yourmail>, [email protected]"
alert-slack-channel = "#test_alert"
alert-slack-url = "https://meet.signal18.io/hooks/<slackhook>"
alert-slack-user = "repman"
and for your first cluster
[test]
title = "test"
prov-orchestrator = "onpremise"
prov-db-tags = "localinfile,compressbinlog,ssd,userstats,gtidstrict,readonly,threadpool,diskmonitor,innodb,noquerycache,slow,pfs,linux,logtotable,deb,nosplitpath,readcommitted,optimistic,utf8ci,semisync,row,sqlerror"
prov-db-memory = "12G"
prov-db-memory-shared-pct = "threads:16,innodb:60,myisam:10,aria:10,rocksdb:1,tokudb:1,s3:1,archive:1,querycache:0"
prov-db-disk-size = "100"
prov-db-cpu-cores = "4"
prov-db-disk-iops = "20000"
db-servers-hosts = "xx.xx.xx.01,xx.xx.xx.02"
db-servers-prefered-master = "xx.xx.xx.01"
db-servers-credential = "repman:hash_900676eb357b6f45a36e09a54df421782df1b33e7716b02e43f4967e"
db-servers-connect-timeout = 1
replication-credential = "replication:hash_900676eb357b6f45a36e09a54df421782df1b33e7716b02e43f4967e"
haproxy = true
haproxy-servers = "xx.xx.xx.70,xx.xx.xx.71"
#proxy-servers-read-on-master=true
verbose = false
log-failed-election = true
log-level = 1
log-rotate-max-age = 7
log-rotate-max-backup = 7
log-rotate-max-size = 5
log-sql-in-monitoring = true
log-sst = false
from replication-manager.
If wan't haproxy to start colocated with replication-manager please try
--haproxy-mode string HAProxy mode [standby|runtimeapi|dataplaneapi] (default "runtimeapi")
standby
could be the doc is wrong here as we changed this later on when introducing runtime api
from replication-manager.
Related Issues (20)
- switchover with children cluster will set the readonly flag on children cluster primary server HOT 11
- A startup error occurs, and the MySQL cluster cannot be automatically switched over. If the primary server is faulty, the mysql cluster cannot be identified HOT 55
- Warning on api password need change for no default
- Database credentials are leaked in API and web interface HOT 16
- Documentation problem api-credentials HOT 1
- Checking oldest binlog timestamp returned Err: Failed to parse binary log datetime string. HOT 4
- Workload metrics not populated in servers endpoint HOT 5
- Switchover via web interface does not indicate authorization error HOT 3
- Unable to trigger the "replication-error-script" HOT 21
- The PROXIES page on the Web is displaying abnormally. HOT 10
- Failover failed caused by split brain restore manual is loosing topology HOT 9
- Allow dynamic setting of metrics collecting from the API/GUI HOT 1
- When a slave failed, repman can cause writer_hostgroup_id to be lost if bootstrap server off and wrong initial proxysql setup HOT 22
- Concurrent login lead to concurrent map writes as no protected by mutex HOT 10
- JWT Token expiration should be expose
- Add state based on historical metrics
- Allow dynamic setting of graph
- ActivePassive Topology does not work with proxy as server is declare standalone
- Bug in Monitoring Capture
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from replication-manager.