Forum Discussion
Nikolay_Matveev
Nimbostratus
Yes, perhaps there are two options here - one is to have two pools with one server in each OR have a single pool with two servers in it... not sure what would the recommended option be. My thinking was that two pools would be a more universal solution (as then I could add servers to each of the pools) but I do not know how to reference pool name.
The code below does not seem to be working
when CLIENT_ACCEPTED {
if { [IP::addr [IP::client_addr] equals 10.0.0.0/8] } {
pool POOL_FOR_EXTERNAL_SERVERS
}
else {
pool POOL_FOR_INTERNAL_SERVERS
}
}
when HTTP_REQUEST {
if { [LB::server pool] eq "POOL_FOR_EXTERNAL_SERVERS" } {
<....handling headers for the external servers..>
} else {
<.. handling headers for the internal servers ..>
}
}
What am I doing wrong here?
Brad_Parker
Feb 12, 2015Cirrus
doing it with pools would make it scale-able if you needed to add servers and the syntax is correct you have here. What's not working exactly, the pool selection? Try adding some logging to see what's happening. Throw something like 'log local0. "External(or Internal) Pool [IP::client_addr]" ' to you if/else statements and see what gets logged.