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

Haproxy throwing http 503 when backend going down

$
0
0

Hello!
I have one haproxy instance over 2 backend web servers. My Haproxy config:

global

defaults
    log	global
    mode	tcp
    option	dontlognull
    timeout connect 5000
    timeout client  50000
    timeout server  50000

listen myfrontend
  bind *:8080
  mode tcp
  default_backend myservices

backend myservices
  mode http	
  option forwardfor
  balance roundrobin
  cookie SERVER_USED indirect nocache
  server server1 192.168.92.1:9191  cookie server1 on-marked-down shutdown-sessions
  server server2 192.168.92.2:8080  cookie server2 on-marked-down shutdown-sessions

Browser established connection to server1 via Haproxy. I found cookie in chrome with some sessonId and serverId = server1. Then I killed server1 process. Trying to establish new connection chrome browser received http 503 error. I try to establish connection via firefox and get successfull connection and cookie with serverId=2. I go back to chrome, removed old cookie with serverId=1 and try to establish new connection. Success! I have connection to server2 with new suitable cookie. So my question is why Haproxy does not switch connection to another backend automatically when server1 has failed?

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 4832

Trending Articles



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