Forum Discussion

Muhammad_Irfan1's avatar
Oct 25, 2014

TCP Half Open health monitor.

I have configured the tcp half open monitor with interval of 2 seconds and timeout of 5 seconds on nodes of pool. What i don't want is losing any requests like zero request lose. How can i get this? Should i set the interval 1 second and timout 3 seconds but for 3 seconds i will get no response from that pool member which is not acceptable.

 

Is there a way that if the pool member do not respond to any request it routed to another pool member instead of dropping it.

 

Please help

 

18 Replies

  • kunjan's avatar
    kunjan
    Icon for Nimbostratus rankNimbostratus
    See if LB_FAILED fits the requirement when LB_FAILED { pool errorPool } https://clouddocs.f5.com/api/irules/LB_FAILED.html
  • Yes that would be great. I do not want to send it to another pool. i want to send it to another member of the same pool. but i do not want a specific iRule for some pool. i want a general one so that i can reuse it everywhere for every pool. i found one can you verify that it will work. when CLIENT_ACCEPTED { set loopcounter 0 } when LB_FAILED { set selected_server [LB::server addr] if {$selected_server == ""} { log local0. "No mdex node available" } elseif { loopcounter <=4 } { log local0. "Node: ${selected_server} not responding." Select another node LB::reselect incr loopcounter } }
  • kunjan's avatar
    kunjan
    Icon for Nimbostratus rankNimbostratus

    There is a typo ,

     

    elseif { $loopcounter <=4 } {

     

    • Thanks that is where it was giving syntax error. Being network guy don't know much about TCL language. The rest of it all right?
    • Muhammad_Irfan1's avatar
      Muhammad_Irfan1
      Icon for Cirrus rankCirrus
      Thanks that is where it was giving syntax error. Being network guy don't know much about TCL language. The rest of it all right?
  • Logically it should work. Got to test it. btw SDN is said to be coming, so might be not be bad to get hands dirty :)

     

    • Muhammad_Irfan1's avatar
      Muhammad_Irfan1
      Icon for Cirrus rankCirrus
      HAHA yeah its very interesting, got to learn it to be able to compete in the market. Sir can you make me an iRule which will work just like proxypass does in Apache. when HTTP_REQUEST { set uri [HTTP::uri] if { $uri starts_with "/CRM" } { HTTP::uri [string map {"/CRM" "" } $uri ] pool Tibco-LB-Group4 } } This iRule works if i keep the proxypass word unique and do not occur again in URL. But if /CRM occurs second time in URL it just removes it from there as well. I just want to /CRM from the start of URI and if occurs again somewhere in the URL iRule should not remove it. Can you change it this way please please
  • kunjan's avatar
    kunjan
    Icon for Nimbostratus rankNimbostratus

    Logically it should work. Got to test it. btw SDN is said to be coming, so might be not be bad to get hands dirty :)

     

    • HAHA yeah its very interesting, got to learn it to be able to compete in the market. Sir can you make me an iRule which will work just like proxypass does in Apache. when HTTP_REQUEST { set uri [HTTP::uri] if { $uri starts_with "/CRM" } { HTTP::uri [string map {"/CRM" "" } $uri ] pool Tibco-LB-Group4 } } This iRule works if i keep the proxypass word unique and do not occur again in URL. But if /CRM occurs second time in URL it just removes it from there as well. I just want to /CRM from the start of URI and if occurs again somewhere in the URL iRule should not remove it. Can you change it this way please please
  • kunjan's avatar
    kunjan
    Icon for Nimbostratus rankNimbostratus

    May try this:

    when HTTP_REQUEST {
        if { [HTTP::uri] starts_with "/CRM" } {
           set index [string first "/CMS" [HTTP::uri]] 
           set uri [string replace [HTTP::uri] $index [expr $index+4] ] 
           HTTP::uri $uri
           pool Tibco-LB-Group4
        }
    }
    
    • Great thanks alot its working perfectly. Sir i have a service running on 3 machines but its deployed twice on 3rd machine with different port. Like 10.50.169.14:9801, 10.50.169.14:9802, 10.50.169.16:9801, 10.50.169.20:9801, But the problem is pool is not allowing me to add pool member 10.50.169.14:9802 and saying that the ip is already use. Whats the possible solution?
  • May try this:

    when HTTP_REQUEST {
        if { [HTTP::uri] starts_with "/CRM" } {
           set index [string first "/CMS" [HTTP::uri]] 
           set uri [string replace [HTTP::uri] $index [expr $index+4] ] 
           HTTP::uri $uri
           pool Tibco-LB-Group4
        }
    }
    
    • Muhammad_Irfan1's avatar
      Muhammad_Irfan1
      Icon for Cirrus rankCirrus
      Great thanks alot its working perfectly. Sir i have a service running on 3 machines but its deployed twice on 3rd machine with different port. Like 10.50.169.14:9801, 10.50.169.14:9802, 10.50.169.16:9801, 10.50.169.20:9801, But the problem is pool is not allowing me to add pool member 10.50.169.14:9802 and saying that the ip is already use. Whats the possible solution?
  • You can try following from Cli, assuming the pool name is Tibco-LB-Group4

    tmsh modify ltm pool Tibco-LB-Group4 members add { 10.50.169.14:9802 }

    If it returns error, may list and see if it's already been configured

    tmsh list ltm pool Tibco-LB-Group4

    • Muhammad_Irfan1's avatar
      Muhammad_Irfan1
      Icon for Cirrus rankCirrus
      Solved it. During adding new pool member in the pool instead of selecting the option of new address, selected existing node. That way it allowed me to add another pool member with same ip but different port and tested it, its working.
  • kunjan's avatar
    kunjan
    Icon for Nimbostratus rankNimbostratus

    You can try following from Cli, assuming the pool name is Tibco-LB-Group4

    tmsh modify ltm pool Tibco-LB-Group4 members add { 10.50.169.14:9802 }

    If it returns error, may list and see if it's already been configured

    tmsh list ltm pool Tibco-LB-Group4

    • Solved it. During adding new pool member in the pool instead of selecting the option of new address, selected existing node. That way it allowed me to add another pool member with same ip but different port and tested it, its working.