Discover Centmin Mod today
Register Now

Wordpress Testing maxcale with glusterfs, Haproxy and wordpress as Single Point of failure on Centminmod

Discussion in 'Centmin Mod User Tutorials & Guides' started by brijendrasial, Jun 25, 2020.

  1. brijendrasial

    brijendrasial Active Member

    Mar 21, 2018
    Local Time:
    11:06 PM
    I created a small MariaDB cluster using 3 vps and choose another one for haproxy and maxscale and created glusterfs replica between three servers. Finally installed WordPress. The thing is its single point of failure if main haproxy node fails all fall.

    Followed tutorials

    Hands on Maxscale and Galera Cluster Centos7 - LinuxGlobe
    GlusterFS Replication on CentOS 7 - LinuxGlobe

    Finally installed WordPress on one of the server and its data got replicated on other 2.

    Will keep posting as I go ahead.
    user: haproxy
    pass: haproxy


    Haproxy configuration

    # FrontEnd Configuration
    frontend main
        bind *:80
        mode http
        option http-server-close
        option forwardfor
        redirect scheme https code 301 if !{ ssl_fc }
    #    acl letsencrypt-acl path_beg /.well-known/acme-challenge/
     #   use_backend letsencrypt-backend if letsencrypt-acl
    frontend main-https
        mode http
        bind *:443 ssl crt /etc/letsencrypt/live/ alpn h2,http/1.1
        default_backend app-main
    # LE Backend
    #backend letsencrypt-backend
      #  server letsencrypt
    # BackEnd roundrobin as balance algorithm
    backend app-main
        mode http
        balance roundrobin                                     #Balance algorithm
        option httpchk HEAD / HTTP/1.1\r\nHost:\ localhost    #Check the server application is up and healty - 200 status code
        server nginx1 check ssl verify none        #Nginx1
        server nginx2 check ssl verify none               #Nginx2
        server nginx3 check ssl verify none              #Nginx3
    listen stats
    ## HAProxy stats web gui.
            bind      :9000
            mode http
            stats enable
            stats uri /haproxy_stats
            stats realm HAProxy Statistics
            stats auth haproxy:haproxy
            stats admin if TRUE
  2. eva2000

    eva2000 Administrator Staff Member

    May 24, 2014
    Brisbane, Australia
    Local Time:
    3:36 AM
    Nginx 1.25.x
    MariaDB 10.x
    Nice thanks for sharing. Maybe better in User Tutorial forum so you get longer timelimits to edit the first post.