Forum Discussion

Charlie_Cliffor's avatar
Charlie_Cliffor
Icon for Nimbostratus rankNimbostratus
Dec 07, 2009

http vs fasthttp profile using irules

Hi,

 

 

I have created a simple URI redirection irule to an application website, which works fine using the Standard VS with the http profile.

 

 

However the VS to which is needs to be applied is currently using a Performance (HTTP) VS with a fasthttp profile.

 

 

fasthttp is used for performance reasons as website access is slow rendering images when using the http profile.

 

 

When I try to apply the following irule using a fasthttp profile, it produces the following error.

 

 

HTTP::redirect in rule (xxxxx) requires an associated HTTP profile on the virtual server (xxxx)

 

 

I understand that fasthttp only supports limited irule functionality. However is it possible to modify this redirection irule to work using the fasthttp profile ?

 

 

when RULE_INIT {

 

 

Setup initial global variables

 

set ::cognos_pool "COGNOS-POOL1"

 

}

 

 

when HTTP_REQUEST {

 

if { [HTTP::uri] eq "/cognos8" } {

 

set uri [HTTP::uri]

 

HTTP::redirect "http://[HTTP::host]/cognos84"

 

}

 

if { [HTTP::uri] starts_with "/cognos8/" } {

 

set uri [HTTP::uri]

 

HTTP::redirect "http://[HTTP::host]/cognos84/[string range $uri 9 end]"

 

}

 

pool $::cognos_pool

 

}

 

 

Many Thanks

 

Charlie Clifford

7 Replies

  • Hi Charlie,

    How about changing it to the following

      
      when RULE_INIT {  
        
       Setup initial global variables  
      set ::cognos_pool "COGNOS-POOL1"  
      }  
        
      when HTTP_REQUEST {  
        if { [HTTP::uri] eq "/cognos8" } {  
        set uri [HTTP::uri]  
        HTTP::uri /cognos84  
        }  
        if { [HTTP::uri] starts_with "/cognos8/" } {  
        set uri [HTTP::uri]  
        HTTP::uri /cognos84/[string range $uri 9 end] 
        }    
      pool $::cognos_pool     
      }   
      

    It's not a redirect but it will change the URI as it passes through the virtual server.

    I hope this helps

    Bhattman
  • It might also be worthwhile troubleshooting why using a standard HTTP profile is slow. There shouldn't be significant slowness with the HTTP profile. You could open a case with F5 Support to get help doing this.

     

     

    Aaron
  • spark_86682's avatar
    spark_86682
    Historic F5 Account

    Posted By hoolio on 12/07/2009 8:34 AM

     

     

    It might also be worthwhile troubleshooting why using a standard HTTP profile is slow. There shouldn't be significant slowness with the HTTP profile. You could open a case with F5 Support to get help doing this.

     

     

     

     

    I would echo this statement.
  • spark_86682's avatar
    spark_86682
    Historic F5 Account

    I understand that fasthttp only supports limited irule functionality. However is it possible to modify this redirection irule to work using the fasthttp profile ?

     

     

     

    It is not possible. Fasthttp does not support sending a redirect, nor does it support changing the URI.
  • I do want to point out that it does except an irule with the HTTP::uri but as Spark as noted it's possible that it allows the acceptance of inserting the irule, but really doesn't work when executed. I noticed this in v9.x code. Not sure if the game has changed on version 10.x

     

     

    Bhattman
  • Hi,

     

     

    Yes the irule was accepted but didnt work. I did suspect that redirect or URI change was not supported using fasthttp.

     

     

    I will log a call with F5. I agree that the HTTP profile should be fine. When going to the server directly performance is fine. When going via the VS the the page images seems to take much longer to load.

     

     

    Thanks for all your help.

     

     

    Regards

     

    Charlie Clifford
  • Curious about your deployment. Is this a particular module of Cognos or the core product? We are about to begin using the TM1 Web set up and lets just say there is a dirth of info available from IBM or the installation partner.

     

     

    You might want to look at the RAMCaching part of your profile where the images may be coming from, I know that there is a bug with RamCache that is overcome with an Irule in the affected versions. I would also get with the Cognos admins and have them set some caching headers on the static stuff in the web server configurations.

     

     

    HTH,

     

     

    Carl B