0

I have a vserver configured with this

-persistenceType CUSTOMSERVERID -lbMethod ROUNDROBIN -rule "URLQUERY CONTAINS sid="

It seems that if the "sid" parameter is set to go to "server 1" and at the time the request comes in, "server 1" is down, it falls back to round robin and sends the request somewhere else (server 2 for example)

How can I configure the NS such that if a request is bound for a server and that server is down, the request is just dropped or rejected?

MichaelB
  • 541
  • 4
  • 10
  • What happens if the request meant for server1 goes to server2 instead? Will it fail nicely? Could let server2 send the TCP-RST instead? – StackzOfZtuff Oct 16 '15 at 06:21

1 Answers1

0

That's the whole point of using load balancer, if one backend is down it WILL go to the other one. If you dont want that, create 2 non-adressable LB vserver behind a content switching and use content switching policy to define what goes where. I do mostly everything from the gui but the end result should be something like this:

add lb vserver LB_for_backend_1 SSL 0.0.0.0 0 -persistenceType COOKIEINSERT -timeout 240 -Listenpolicy None -cltTimeout 180
add lb vserver LB_for_backend_2 SSL 0.0.0.0 0 -persistenceType COOKIEINSERT -timeout 240 -Listenpolicy None -cltTimeout 180

bind lb vserver LB_for_backend_1 service_For_Backend_1
bind lb vserver LB_for_backend_2 ServiceGroup_for_backend_2

add cs vserver CS_CUSTOMSERVERID SSL 192.168.1.100 443 -cltTimeout 180 -Listenpolicy None
add cs policy CSPol_for_backend_1 -rule "HTTP.REQ.URL.SET_TEXT_MODE(IGNORECASE).CONTAINS(\"sid=")
add cs policy CSPol_for_backend_2 -rule "HTTP.REQ.HOSTNAME.SET_TEXT_MODE(IGNORECASE).CONTAINS(\"hostname")" 

bind cs vserver CS_CUSTOMSERVERID -policyName CSPol_for_backend_1 -targetLBVserver LB_for_backend_1 -priority 110
bind cs vserver CS_CUSTOMSERVERID -policyName CSPol_for_backend_2 -targetLBVserver LB_for_backend_2 -priority 120
Cividan
  • 79
  • 3
  • 10