Forum Discussion

dave_20279's avatar
dave_20279
Icon for Nimbostratus rankNimbostratus
Aug 08, 2008

HTTP Request Redirection from one BigIP to another BigIP

Hi,

We have two datacentres (A & B) each with a BigIP.

We'd like to redirect traffic coming into a Virtual Server associated with a pool on BigIP A to a Virtual Server asscociated with a pool on BigIP B.

So far on BigIP A we have an irule associated with a Virual server that will redirect the traffic destined for one pool to another pool (on BigIp A) under certain conditions.

when HTTP_REQUEST { 
  
   set orig_uri [HTTP::uri]   
   set s_replace "/new_car"  
   set new_uri ""   
  
    if { $orig_uri starts_with "/new_car" } {  
 if   {[string equal -nocase $orig_uri "/new_car/"]}{ 
 set new_uri "/info.aspx?id=18" 
 } 
 else { 
 set new_uri [regsub -nocase {/new_car} $orig_uri ""] 
 } 
 log local0.notice "x $new_uri x"  
 HTTP::uri $new_uri 
                 pool LIVE-xyz 
 } 
 else { 
 log local0.notice "no match"  
 return 
     } 
 } 
 

Basically where we have 'pool LIVE-xyz' we'd like to redirect the traffic to a VS on BigIP B

Can anyone shed any light on whether or not this is feasible and help us out with a solution.

Regards,

Dave
  • I wonder if you can redirect the host from BigIP A to BigIP B, then have another irules on BigIP B to check for conditions.
  • By rewrite do you mean send a response to the client browser saying the content has moved 301/302 http redirect?

     

     

    We are trying to achieve this without the browser knowing it's gone to another server i.e proxy the request from bigip a to bigip b so the browser always displays www.xyz.com/new_car in the location bar.

     

     

    Is this possible between two big ip's ?

     

     

  • Are the Big IP A & B connect to the same physical servers? If they are, I don't see why you need 2 seperated Big IP systems. If they ain't, then I don't think this could be accomplished, otherwise people can use this to hijack a site. (This's just my own opinion).
  • Hi,

     

     

    nope they are iin two datacentres connected to two seperate pools of servers. in front of this we have a 3dns system that we use to switch traffic from one datacenter to the other. The service (group of servers) we want to redirect traffic to (if it matches xyz.com/new_cars/) is in site B but requests will be coming into site A to our main group of servers on our main domain name.

     

     

    "then I don't think this could be accomplished" - i think that's my answer(unless anyone else has a solution) thanks puma

     

     

    We can acomplish this redirection of trafffic transparently via apache and mod_proxy but i thought it may be quicker to let BigIP handle it.
  • Ok, now I can see the whole picture. I don't think you can accomplished with the LTM but not so sure with GTM. You may want to check with F5 folks.
  • Patrick_Chang_7's avatar
    Patrick_Chang_7
    Historic F5 Account
    You can create a pool on LTM A which consists of the VS on LTM B. The only requirement is that LTM A can reach the VS on LTM B.