Forum Discussion

Paul_Visser_193's avatar
Paul_Visser_193
Icon for Nimbostratus rankNimbostratus
Feb 19, 2019

Is it possible to have two different fallback pages?

A customer of us wants a redirect to a webpage in case of a LB_FAILED and a redirect to different webpage in case of maintenance.

 

I managed to create the fallback in case of maintenance by creating a monitor to a specific file on the backend nodes checking the content to a specific word.

 

Is it possible, and if yes how, to create a second option to redirect in case of a failure?

 

21 Replies

  • I think I found the/a solution to work with the monitor by combining your info on LB_FAILED section and the info from:

     

    https://support.f5.com/csp/article/K12818 and https://devcentral.f5.com/codeshare?sid=693

     

    With the monitor by using both 'receive string' and 'receive disable string' I can get the state of the pool in 'disable' or 'down'. Then using 'disable' in the when HTTP_REQUEST and 'down' in the when LB_FAILED section to redirect to different webpages.

     

    Thanks for your input.

     

  • Example is:

     

    when LB_FAILED { if { [active_members [LB::server pool]] != 0 } { HTTP::fallback "; } else { HTTP::fallback "; } }

     

    • RaghavendraSY_7's avatar
      RaghavendraSY_7
      Icon for Cumulonimbus rankCumulonimbus

      LB_FAILED Trigger points:

       

      1. When failed to select a pool member
      2. When Pool member selected is not reachable from F5
      3. When Pool member fails to respond to connection

      When LB_Failed trigger happens request will go to Test1 if a server dies in the middle of an active connection, and send clients to Test2 if there are no active pool members to load balance.

       

      hope this clears.

       

    • Paul_Visser_193's avatar
      Paul_Visser_193
      Icon for Nimbostratus rankNimbostratus

      Ok, but when does test1 get invoked then? How do I get LB_Failed and still a member in the pool?

       

      BTW, I appreciate your help in this, thanks.

       

  • Example is:

     

    when LB_FAILED { if { [active_members [LB::server pool]] != 0 } { HTTP::fallback "; } else { HTTP::fallback "; } }

     

    • RaghavendraSY's avatar
      RaghavendraSY
      Icon for Altostratus rankAltostratus

      LB_FAILED Trigger points:

       

      1. When failed to select a pool member
      2. When Pool member selected is not reachable from F5
      3. When Pool member fails to respond to connection

      When LB_Failed trigger happens request will go to Test1 if a server dies in the middle of an active connection, and send clients to Test2 if there are no active pool members to load balance.

       

      hope this clears.

       

    • Paul_Visser_193's avatar
      Paul_Visser_193
      Icon for Nimbostratus rankNimbostratus

      Ok, but when does test1 get invoked then? How do I get LB_Failed and still a member in the pool?

       

      BTW, I appreciate your help in this, thanks.

       

    • Paul_Visser_193's avatar
      Paul_Visser_193
      Icon for Nimbostratus rankNimbostratus

      I read the above post but did not yet see how it solves my problem.

       

    • Paul_Visser_193's avatar
      Paul_Visser_193
      Icon for Nimbostratus rankNimbostratus

      I read the above post but did not yet see how it solves my problem.