Quantcast
Channel: HAProxy community - Latest topics
Viewing all articles
Browse latest Browse all 4735

HAProxy do not take behavior of roundrobin

$
0
0

@Paul.LKW wrote:

Dear all:
I just installed haproxy-1.8.4 and configured it as basic roundrobin setup, however I find phpmyadmin could not login as every time I typed login ID and password and click Login it will bring forward to next backend server and hence I get a new session ID, so I googled for dualing with cookie/session and find it could be solved by inserting “cookie SESSIONID insert postonly indirect” within the backend section, however after this statement I find it will not go to next server anymore.

Below is my configuration file, anything I am wrong ?

global
daemon
maxconn 256
#user haproxy
#group haproxy
log /var/log local0
log /var/log local1 notice
stats socket /var/run/haproxy/admin.sock mode 660 level admin
stats timeout 30s

    # Default SSL material locations
    #ca-base /etc/ssl/certs
    #crt-base /etc/ssl/private

defaults
mode http
timeout connect 5000ms
timeout client 50000ms
timeout server 50000ms

frontend http-800-in
bind *:800 #This port will route to default port 80 defined by below “backend server” section
reqadd X-Forwarded-Proto:\ http
default_backend servers

backend servers
mode http
balance roundrobin
#Add this below to get the clients actually IP address. Without this,
#our application would instead see every incoming request as coming from the load balancer’s IP address
option forwardfor
#Add this to let our applications knows what port to use when redirecting/generating URLs
http-request set-header X-Forwarded-Port %[dst_port]

    #http-request add-header X-Forwarded-Proto https if { ssl_fc }
    option httpchk HEAD / HTTP/1.1\r\nHost:localhost

    ### Below is for http-auth feature ###
    acl draw-auth http_auth(auth_list)
    http-request auth realm draw unless draw-auth

    #Below is our backend server list
    cookie SESSIONID insert postonly indirect
    server ET-POC-RH01 123.45.67.8:80 check cookie check
    server ET-POC-RH02 123.45.67.8:80 check cookie check
    server ET-POC-RH03 123.45.67.8:80 check cookie check

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4735

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>