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

HAProxy keeps using the same server for every request (on same conn)

$
0
0

I’m using roundrobin on a http backend to rotate upstream http proxies.
For some reason, the load is balanced as expected on new connections, but making multiple requests from the same connection uses the same http proxy every time.
I’ve tried both option httpclose and option http-server-close, but this has no effect on anything.

I use curl to execute 3 requests, all of which returns the same ip (meaning all requests went through the same proxy).

curl --proxy “http://haproxy:3128https://ip.oxylabs.io --next --proxy “http://haproxy:3128https://ip.oxylabs.io --next --proxy “http://haproxy:3128https://ip.oxylabs.io

Doing these with separate connections (without --next, but separate curl executions) i see correct loadbalancing and new ip on every request.

Here’s my config

defaults 
mode http
maxconn 3000
log global
option httplog
option redispatch
option dontlognull
option http-server-close
option forwardfor except 127.0.0.0/8
timeout http-request 10s
timeout check 10s
timeout connect 10s
timeout client 1m
timeout queue 1m
timeout server 1m
timeout http-keep-alive 10s
retries 3

frontend main
bind *:3128
default_backend pool

backend pool
mode http
balance roundrobin
timeout queue 30s
timeout server 30s
timeout connect 5s

  server xx.xx.xx.xx:xxxx xx.xx.xx.xx:xxxx verify none
  server yy.yy.yy.yy:yyyy yy.yy.yy.yy:yyyy verify none

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 4849

Trending Articles



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