Forum Discussion

EL's avatar
EL
Icon for Nimbostratus rankNimbostratus
Sep 01, 2016

http header rewrite

Hi All,

I would like to ask whether F5 ltm with or without irule can do the following requirement

current setup client (application) ---> VS F5------Pool member1 priority group 10 |--Pool member2 priority group 20

so F5 always go to pool member1 if the pool member 1 still available and will go to pool member 2 if pool member 1 down or offline

but there's certain requirement from the partner in order to make the failover work properly which is need to replace the http host header and their custom http header. below is the process

1) Application sends Cmd (outbound request to server) using a request URL based on responseUrl header and X-DOT header

2) LB will intercepts all the outbound requests and forward proxy to your endpoint based on health checks

3) If LB needs to fail over to DR site, LB need to do HTTP rewrite policies to our URL request a such

    a. First, LB will replace the FQDN/host alias of the request URL with your respective DR FQDN        (e.g. nc-dot1.abc.com  to nc-dot1-dr.abc.com)

    b. Secondly, LB need to rewrite/replace the value of the X-DOT header with the DR FQDN

    c. Thirdly, LB LB need to rewrite/replace the value of the responseURL header with the DR FQDN

4) The LB will forward our “rewritten” outbound request to your DR VIP in the case of DR on your pod.

Thanks in advance

6 Replies

  • when LB_SELECTED {
       if the node selected has the IP of the DR node...
      if { [IP::addr [IP::server_addr] equals 10.0.0.1] } {
        HTTP::header replace Host "nc-dot1-dr.abc.com"
        HTTP::header replace X-DOT "nc-dot1-dr.abc.com"
        HTTP::header replace responseURL "nc-dot1-dr.abc.com"
        STREAM::expression {@nc-dot1.abc.com@nc-dot1-dr.abc.com@}
      }
    }
    

    This might work, I am sketchy on the STREAM part.

    • EL's avatar
      EL
      Icon for Nimbostratus rankNimbostratus

      Hi ekaleido

       

      Thanks for your prompt response, i will test it out. thanks alot

       

    • EL's avatar
      EL
      Icon for Nimbostratus rankNimbostratus

      Hi ekaleido

       

      Thanks for your prompt response, I will test it out.

       

  • when LB_SELECTED {
       if the node selected has the IP of the DR node...
      if { [IP::addr [IP::server_addr] equals 10.0.0.1] } {
        HTTP::header replace Host "nc-dot1-dr.abc.com"
        HTTP::header replace X-DOT "nc-dot1-dr.abc.com"
        HTTP::header replace responseURL "nc-dot1-dr.abc.com"
        STREAM::expression {@nc-dot1.abc.com@nc-dot1-dr.abc.com@}
      }
    }
    

    This might work, I am sketchy on the STREAM part.

    • EL's avatar
      EL
      Icon for Nimbostratus rankNimbostratus

      Hi ekaleido

       

      Thanks for your prompt response, i will test it out. thanks alot

       

    • EL's avatar
      EL
      Icon for Nimbostratus rankNimbostratus

      Hi ekaleido

       

      Thanks for your prompt response, I will test it out.