03-10-2014 12:16 PM
Hello All,
I am trying to loadbalance requests for webservices in a serverfarm. But for some reason, ACE20 module y not making matches on the requests.
We have a serverfarm Prod1 with 2 real servers and another serverfarm named WSDL with other 2 real servers.
The idea is the following, if we receive the following string, /App.WebService, the ACE should redirect it to serverfarm Prod1, but if it receives /App.WebService?wsdl, it should be redirected to WSDL.
Request with string /App.WebService --------------> ServerFarm Prod1
Request with string /App.WebService?wsdl -----> ServerFarm WSDL
We use regular expression in L7 class maps to make the loadbalance to happen.
class-map type http loadbalance match-all APP.WEBSERVICES-L7-SLB
2 match http url /App\.WebService\?wsdl
class-map type http loadbalance match-all APP-L7-SLB
2 match http url /App\.WebService
--
policy-map type loadbalance first-match L7_SLB-POLICY
class APP.WEBSERVICES-L7-SLB
serverfarm WSDL
class APP-L7-SLB
serverfarm Prod1
--
class L4_SLB_DATAPOWER(9050)
loadbalance vip inservice
loadbalance policy L7_SLB-POLICY
loadbalance vip icmp-reply
appl-parameter http advanced-options HTTP_PARAM
ssl-proxy server wildcard.test.org
connection advanced-options TCP_PARAM
But the ACE20 Module seems to be removing the ?wsdl from the URL and only the class-map called APP-L7-SLB is being matched.
Any comments or suggestions on why this could be happening?
Thanks in advance,
Fernando
03-11-2014 09:09 AM
Hi Fernando,
Do you have "parsing non-strict" in http parameter map? If not, kindly apply that and check if that makes a difference.
Regards,
Kanwal
03-12-2014 09:10 AM
Hello Kanwal,
I've added the parsing non-strict to the parameter-map but the problem is still happening. The ACE seems to be removing the ?WSDL from the URL, therefore the loadbalance is not happening.
Thanks anyway for the quick response.
Fernando
03-12-2014 01:24 PM
Hello Kanwal and all,
Finally, after reading and reading I found a fix to this problem. Seems that the HTTP protocol uses the question mark (?) character as a delimiter for data appended to the URL. So, if you get the following:
www.test1.org/App.WebService?wsdl
If you configured a L7 class map to parse the URL, it will only parse until the question mark (?).
So you need to create a PARAMETER-MAP changing the URL delimiter start. Here is an example:
parameter-map type http HTTP_PARAMETER_MAP_WSDL
persistence-rebalance strict
set secondary-cookie-delimiters ;!@?
set secondary-cookie-start ;
I used the semicolon ( ; ) as delimiter.
Hope this helps.
Fernando
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide