Forum Discussion

Ozu_26840's avatar
Ozu_26840
Icon for Nimbostratus rankNimbostratus
Mar 13, 2014

HTTP redirect to a cloud server

Hello,

 

I need to send http data to a server in the cloud. The setup I need to put in place is 1 server in premise and another server in the cloud. When a request arrive to http://myexample.com it must go to the server in premise, when the request is for http://myexample/path/ it must be sent to the cloud server.

 

The cloud server is supposed to answer back via the F5 LTM load-balancer in premise and the url must appear as the same as http://myexample/path (I can't do a redirect rewrite).

 

Can you please let me know if I can do this and how ?

 

Thanks in advance.

 

7 Replies

  • does this cloud server have a dedicated IP address or is it by name only? Possible either way, just more complicated in the latter scenario.
  • Hi Jason,

     

    The server has a static/dedicated IP address. The server is an Elastic Load-Balancer (ELB) in AWS. It can be called either by a url or by ip address.

     

  • so just add the static IP to the pool, then you can just map the the pool member for that uri path. make sure the routing is in place for that to route to/from aws.

    when HTTP_REQUEST {
      if { [string tolower [HTTP::uri]] starts_with "/path" } {
        pool $pool_name member $elb_ip $port
      }
    }
    
  • Hi Jason,

     

    I have tried that Irule but it's not working, I have put the AWS server in the pool and have checked connectivity. The LTM has access to the AWS server.

     

    The irule is not redirecting the traffic to the AWS, it's still going to the same place (the same other server).

     

    • SanjayP's avatar
      SanjayP
      Icon for Nacreous rankNacreous
      can you try below when HTTP_REQUEST { if { [string tolower [HTTP::uri]] starts_with "/path" } { node cloudserverIP port } }