Join the community today
Register Now

Beta Branch addons/haproxy.sh preview

Discussion in 'Beta release code' started by eva2000, Aug 27, 2017.

Tags:
Thread Status:
Not open for further replies.
  1. eva2000

    eva2000 Administrator Staff Member

    30,634
    6,862
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,308
    Local Time:
    1:51 PM
    Nginx 1.13.x
    MariaDB 5.5
    Haproxy load balancer is another 'to do' list item I am planning for future Centmin Mod versions. Most likely will be added as an addon at addons/haproxy.sh when eventually ready.

    This is just a preview thread :)

    Haproxy 1.7.9 with OpenSSL 1.1.0f + Lua + zlib + Pcre/Pcre Jit + Transparent Proxy
    Code (Text):
    haproxy -vv
    HA-Proxy version 1.7.9 2017/08/18
    Copyright 2000-2017 Willy Tarreau <willy@haproxy.org>
    
    Build options :
      TARGET  = linux2628
      CPU     = native
      CC      = gcc
      CFLAGS  = -march=native -m64 -march=x86-64 -O2 -g
      OPTIONS = USE_LINUX_SPLICE=1 USE_LINUX_TPROXY=1 USE_ZLIB=1 USE_REGPARM=1 USE_OPENSSL=1 USE_LUA=1 USE_PCRE=1 USE_PCRE_JIT=1
    
    Default settings :
      maxconn = 2000, bufsize = 16384, maxrewrite = 1024, maxpollevents = 200
    
    Encrypted password support via crypt(3): yes
    Built with zlib version : 1.2.11
    Running on zlib version : 1.2.11
    Compression algorithms supported : identity("identity"), deflate("deflate"), raw-deflate("deflate"), gzip("gzip")
    Built with OpenSSL version : OpenSSL 1.1.0f  25 May 2017
    Running on OpenSSL version : OpenSSL 1.1.0f  25 May 2017
    OpenSSL library supports TLS extensions : yes
    OpenSSL library supports SNI : yes
    OpenSSL library supports prefer-server-ciphers : yes
    Built with PCRE version : 8.41 2017-07-05
    Running on PCRE version : 8.41 2017-07-05
    PCRE library supports JIT : yes
    Built with Lua version : Lua 5.3.4
    Built with transparent proxy support using: IP_TRANSPARENT IPV6_TRANSPARENT IP_FREEBIND
    
    Available polling systems :
          epoll : pref=300,  test result OK
           poll : pref=200,  test result OK
         select : pref=150,  test result OK
    Total: 3 (3 usable), will use epoll.
    
    Available filters :
            [COMP] compression
            [TRACE] trace
            [SPOE] spoe


    Haproxy statistics

    haproxy-1.7.9-stats-01.png haproxy-1.7.9-stats-02.png haproxy-1.7.9-stats-03.png
     
    • Like Like x 1
    • Winner Winner x 1
  2. eva2000

    eva2000 Administrator Staff Member

    30,634
    6,862
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,308
    Local Time:
    1:51 PM
    Nginx 1.13.x
    MariaDB 5.5

    haproxytool



    haproxytool command line support
    Code (Text):
           
    haproxytool frontend -c --file /var/run/haproxy/haproxy.sock
    www 20000
    haproxy-stats 20000
    
    

    Code (Text):
    haproxytool frontend -s --file /var/run/haproxy/haproxy.sock
    www OPEN
    haproxy-stats OPEN
    
    

    Code (Text):
    haproxytool frontend -r --file /var/run/haproxy/haproxy.sock
    www 3730
    haproxy-stats 27
    
    

    Code (Text):
    haproxytool backend -s --file /var/run/haproxy/haproxy.sock
    haproxy-stats UP
    spider_backend UP
    backend_tarpit UP
    www_backend UP
    

    Code (Text):
    haproxytool backend -r --file /var/run/haproxy/haproxy.sock
    haproxy-stats 16
    spider_backend 220
    backend_tarpit 0
    www_backend 3510
    

    Code (Text):
    haproxytool backend -S --file /var/run/haproxy/haproxy.sock
    haproxy-stats
    spider_backend
        server1
        server2
        server3
    backend_tarpit
    www_backend
        server1
        server2
        server3
    

    Code (Text):
    haproxytool server -W --file /var/run/haproxy/haproxy.sock
    # backendname servername
    spider_backend                 server1                                    2
    spider_backend                 server2                                    2
    spider_backend                 server3                                    2
    www_backend                    server1                                    2
    www_backend                    server2                                    2
    www_backend                    server3                                    2
    

    Code (Text):
    haproxytool server -s --file /var/run/haproxy/haproxy.sock
    # backendname servername
    spider_backend                 server1                                    UP
    spider_backend                 server2                                    UP
    spider_backend                 server3                                    UP
    www_backend                    server1                                    UP
    www_backend                    server2                                    UP
    www_backend                    server3                                    UP
    

    Code (Text):
    haproxytool server -r --file /var/run/haproxy/haproxy.sock
    # backendname servername
    spider_backend                 server1                                    110
    spider_backend                 server2                                    110
    spider_backend                 server3                                    0
    www_backend                    server1                                    1710
    www_backend                    server2                                    1800
    www_backend                    server3                                    0
    

    Code (Text):
    haproxytool dump --file /var/run/haproxy/haproxy.sock
    # frontend name, status, requests, process_nb
    www,OPEN,3730,[1]
    haproxy-stats,OPEN,27,[1]
    # backend name, status, requests, servers
    haproxy-stats,UP,16,
    spider_backend,UP,220,server1,server2,server3
    backend_tarpit,UP,0,
    www_backend,UP,3510,server1,server2,server3
    # server name, status, requests, backend
    server1,UP,110,spider_backend
    server2,UP,110,spider_backend
    server3,UP,0,spider_backend
    server1,UP,1710,www_backend
    server2,UP,1800,www_backend
    server3,UP,0,www_backend
    

    Code (Text):
    haproxytool acl -l --file /var/run/haproxy/haproxy.sock
    # id (file) description
    0 () acl 'always_true' file '/etc/haproxy/haproxy.cfg' line 54
    1 () acl 'src_get_gpc0' file '/etc/haproxy/haproxy.cfg' line 86
    2 () acl 'hdr_cnt' file '/etc/haproxy/haproxy.cfg' line 92
    3 () acl 'hdr_cnt' file '/etc/haproxy/haproxy.cfg' line 93
    4 () acl 'hdr_val' file '/etc/haproxy/haproxy.cfg' line 94
    5 () acl 'hdr_cnt' file '/etc/haproxy/haproxy.cfg' line 95
    6 () acl 'url_sub' file '/etc/haproxy/haproxy.cfg' line 100
    7 () acl 'path_end' file '/etc/haproxy/haproxy.cfg' line 101
    8 () acl 'path_dir' file '/etc/haproxy/haproxy.cfg' line 104
    9 (/etc/haproxy/spiderbotlist.lst) pattern loaded from file '/etc/haproxy/spiderbotlist.lst' used by acl at file '/etc/haproxy/haproxy.cfg' line 109
    10 () acl 'hdr_sub' file '/etc/haproxy/haproxy.cfg' line 109
    11 () acl 'sc2_conn_rate' file '/etc/haproxy/haproxy.cfg' line 137
    12 () acl 'sc2_bytes_out_rate' file '/etc/haproxy/haproxy.cfg' line 138
    13 () acl 'be_sess_rate' file '/etc/haproxy/haproxy.cfg' line 159
    14 () acl 'be_conn' file '/etc/haproxy/haproxy.cfg' line 160
    15 () acl 'wait_end' file '/etc/haproxy/haproxy.cfg' line 163
    -1 () acl 'http_auth' file 'internal-stats-auth-compat' line 0
    
     
    • Like Like x 1
Thread Status:
Not open for further replies.