Forum Discussion

Eridano_Di_Piet's avatar
Eridano_Di_Piet
Icon for Nimbostratus rankNimbostratus
Aug 13, 2009

Load Balancing WAP according to version

Hi all,

 

I need to load balance traffic going to Wap Gateways according to the WAP version (1.X or 2.0) of the request.

 

Is it possible to create an iRule (or something) on LTM do so?

 

Thanks,

 

BR,

 

Erik

4 Replies

  • Hi Erik

    Very possible. The irules that you right up must at the HTTP Headers and see which header would responsible for telling the WAP version.

    I.E.

     
      when HTTP_REQUEST {  
         if { ([HTTP::host] equals "www.domain.com" ) and ([HTTP:uri] equals "someuri/goeshere") } {  
           switch -glob [HTTP::header "User-Agent"]  { 
            "1.x"  {  
                 pool pool_wap_gateway1 
            "2.0" { 
                 pool pool_wap_gateway2 
                     }  
            "3.0" { 
                 pool pool_wap_gateway3 
            } 
         }  
      }  
     

    Of course this is untested and I wasn't too sure about user-agent being the place where WAP version is contained. However, I think it's going to get you much closer to your goal.

    I hope this helps

    CB

  • Just a small note: if the User-Agent header contains the version as part of the string, you'd want to add wildcards to the switch cases:

     

     

    "*1.x*" ...

     

    "*2.0*" ...

     

     

    Aaron
  • Hi,

     

    thank you for your answer, unfortunately the User-Agent header doesn't contain any info regarding the WAP version, besides to that, WAP 1.X doesn't use HTTP, I mean, it can use it but it's not the rule, so it can be encapsulated directly in UDP.

     

    thanks again,

     

    BR,

     

    Erik.
  • Hi Erik,

     

     

    If it's UDP, then you could use UDP::payload (Click here) to inspect the UDP payload and make a load balancing decision. If you want to load balance each UDP packet independently regardless of whether it was received from the same client IP:port combination, you'd want to enable LB datagram on the UDP profile (Click here).

     

     

    Aaron