Forum Discussion

Asif_Pasha_3042's avatar
Asif_Pasha_3042
Icon for Nimbostratus rankNimbostratus
Jul 13, 2017

URI Based load balancing.

URI Based load balancing. I am need to create an Irule which can monitor node if the URI is up on the node and then send traffic to it else redirect it to some other node in the pool. Appreciate any inputs on the same. Thanks.

 

  • You can create an appropriate health monitor (http/https) and configure it to perform a check against the URI you have in mind e.g.

    GET /your/path/file.php HTTP/1.1\r\nHost: my.domain.com \r\nConnection: Close\r\n\r\n
    

    If you apply the monitor to your pool (ensure the members are configured to use the monitor). If a member is marked as being unhealthy because it fails the health check then new requests will be sent to an alternate pool member.

    • Asif_Pasha_3042's avatar
      Asif_Pasha_3042
      Icon for Nimbostratus rankNimbostratus

      Great!!! Thanks a ton. In my case there are nearly 20 URIs. Do I need to add them in sequence? GET /your/path/file1.php HTTP/1.1\r\nHost: my.domain.com \r\nConnection: Close\r\n\r\n GET /your/path/file2.php HTTP/1.1\r\nHost: my.domain.com \r\nConnection: Close\r\n\r\n GET /your/path/file3.php HTTP/1.1\r\nHost: my.domain.com \r\nConnection: Close\r\n\r\n and so on.... Kindly suggest

       

    • Asif_Pasha_3042's avatar
      Asif_Pasha_3042
      Icon for Nimbostratus rankNimbostratus

      Customer complains that if one URI is having issue then the health monitor should mark it down. Else the traffic will still keep going to the same server again and again. Hence any URI among 20 may go down. so, we need to monitor them all. Kindly advice.

       

  • You can create an appropriate health monitor (http/https) and configure it to perform a check against the URI you have in mind e.g.

    GET /your/path/file.php HTTP/1.1\r\nHost: my.domain.com \r\nConnection: Close\r\n\r\n
    

    If you apply the monitor to your pool (ensure the members are configured to use the monitor). If a member is marked as being unhealthy because it fails the health check then new requests will be sent to an alternate pool member.

    • Asif_Pasha_3042's avatar
      Asif_Pasha_3042
      Icon for Nimbostratus rankNimbostratus

      Great!!! Thanks a ton. In my case there are nearly 20 URIs. Do I need to add them in sequence? GET /your/path/file1.php HTTP/1.1\r\nHost: my.domain.com \r\nConnection: Close\r\n\r\n GET /your/path/file2.php HTTP/1.1\r\nHost: my.domain.com \r\nConnection: Close\r\n\r\n GET /your/path/file3.php HTTP/1.1\r\nHost: my.domain.com \r\nConnection: Close\r\n\r\n and so on.... Kindly suggest

       

    • Asif_Pasha_3042's avatar
      Asif_Pasha_3042
      Icon for Nimbostratus rankNimbostratus

      Customer complains that if one URI is having issue then the health monitor should mark it down. Else the traffic will still keep going to the same server again and again. Hence any URI among 20 may go down. so, we need to monitor them all. Kindly advice.