美文网首页
octavia lb 使用

octavia lb 使用

作者: cloudFans | 来源:发表于2020-10-26 16:57 被阅读0次
    1. 登陆lb所在amphora-haproxy 虚拟机

    该虚拟机在namespace中起了一个haproxy用于做负载均衡器

    bash-4.4# ip netns exec amphora-haproxy netstat -tunlp
    Active Internet connections (only servers)
    Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
    tcp 0 0 172.20.90.183:6443 0.0.0.0:* LISTEN 2033/haproxy

    ps -xua | grep 2033
    nobody 2033 0.0 15.8 281264 159024 ? Ss 08:25 0:00 /usr/sbin/haproxy -Ws -f /var/lib/octavia/846d4b15-d56d-4f96-8980-f6c4d342255b/haproxy.cfg -f /var/lib/octavia/haproxy-default-user-group.conf -p /var/lib/octavia/846d4b15-d56d-4f96-8980-f6c4d342255b/846d4b15-d56d-4f96-8980-f6c4d342255b.pid -L puduhwVEKyeTOl5BLhcUm5RKXYM -sf 1969
    root 2293 0.0 0.1 12108 1024 pts/1 S+ 08:51 0:00 grep 2033

    bash-4.4# cat /var/lib/octavia/846d4b15-d56d-4f96-8980-f6c4d342255b/haproxy.cfg

    Configuration for loadbalancer 846d4b15-d56d-4f96-8980-f6c4d342255b

    global
    daemon
    user nobody
    log /run/rsyslog/octavia/log local0
    log /run/rsyslog/octavia/log local1 notice
    stats socket /var/lib/octavia/846d4b15-d56d-4f96-8980-f6c4d342255b.sock mode 0666 level user
    maxconn 1000000

    defaults
    log global
    retries 3
    option redispatch
    option splice-request
    option splice-response
    option http-keep-alive

    frontend 9a3a1423-57ab-484d-ad68-de2458a6228b
    maxconn 1000000
    bind 172.20.90.183:6443
    mode tcp
    default_backend 3de24477-5737-4c03-91e1-348ada67b9b8:9a3a1423-57ab-484d-ad68-de2458a6228b
    timeout client 50000
    log-format e1e174c711634b5f9002690bcf0d82e3\ 846d4b15-d56d-4f96-8980-f6c4d342255b\ %f\ %ci\ %cp\ %t\ -\ -\ %B\ %U\ %[ssl_c_verify]\ %{+Q}[ssl_c_s_dn]\ %b\ %s\ %Tt\ %tsc

    backend 3de24477-5737-4c03-91e1-348ada67b9b8:9a3a1423-57ab-484d-ad68-de2458a6228b
    mode tcp
    balance roundrobin
    timeout check 5s
    fullconn 1000000
    option allbackups
    timeout connect 5000
    timeout server 50000
    server 80f2fb11-32cf-4147-9731-5f6e7bbd7c89 172.20.90.178:6443 weight 1 check inter 5s fall 3 rise 3
    server 2d3deed2-6bb9-4c03-b3ae-a9d62092bd7d 172.20.90.214:6443 weight 1 check inter 5s fall 3 rise 3
    server 2c261a0a-209d-422a-85bb-f0da2c6a3d61 172.20.90.99:6443 weight 1 check inter 5s fall 3 rise 3

    相关文章

      网友评论

          本文标题:octavia lb 使用

          本文链接:https://www.haomeiwen.com/subject/ebzamktx.html