vADC Forum

Reply
New Contributor
Posts: 2
Registered: ‎02-13-2015
Accepted Solution

Load Balancing Help...

A client of mine is trying to Load Balance an 2 x Application Appliances using a SteelApp Stingray.

I am not 100% sure of what has been done on the Stingray, but this is an example of the required scenario.

Users will navigate to 'http://appliationname.domainname.com.au' in their browsers.

Stingray has the 2 x application appliances configured as per below to load balance the traffic:-

application-product.prod01.domainname.com.au

application-product.prod02.domainname.com.au

We have an additional requirement to add the following to the end of the URL once the traffic has been load balanced to direct the users directly to the log in page of the application:-

application-product.prod01.domainname.com.au/folder/login.html

application-product.prod02.domainname.com.au/folder/login.html


I have read similar posts in the Forum that talk about re-writing URLs or redirecting requests, but my client cannot seem to get this working.  Has anyone done anything similar or can someone tell me if this is at all possible?  If anyone can advise how to achieve this, it would be appreciated.

New Contributor
Posts: 2
Registered: ‎02-13-2015

Re: Load Balancing Help...

No replies?  Is the device not capable of doing this?

Brocadian
Posts: 58
Registered: ‎11-29-2012

Re: Load Balancing Help...

You can use either rule builder or Traffic Script functions to (see Rule bulder “Set URL Path” or “HTTP Redirect”  or Traffic Script  “http.setpath” “http.redirect”  functions) to modify the clients request.

The question is what condition do you require to redirect to “/folder/login.html”?

If you want to direct all users to “/folder/login.html “then try

http.redirect( "/folder/login.html" );

or


http.setpath( "/folder/login.html" );





The problem with these, without any condition all requests are going to be modified.

If the condition desired is for all requests for “/” to be redirected then try:


$path = http.getpath();


if( $path == "/" ){


        http.redirect( "/folder/login.html" );


}





If the condition desired is for all with an empty “user” cookie try:


if( http.getcookie( "user" ) == "" ){


        http.redirect( "/folder/login.html" );


}





If the condition desired is for all with an empty WWW-Authenticate header try:


if( http.getheader( "WWW-Authenticate" ) == "" ){


        http.redirect( "/folder/login.html" );


}





You can even use a combination of cookies or headers


if( http.getcookie( "user" ) != ""


        || http.getheader( "WWW-Authenticate" ) == "" ){


        http.redirect( "/folder/login.html" );


}





The rules need to be applied and enabled as request rules to the virtual server in use. If you are not familiar with Traffic Script all of these functions (and more!) can be implemented with RuleBulder i.e.Capture.JPG.jpg

Join the Community

Get quick and easy access to valuable resource designed to help you manage your Brocade Network.