Forum Discussion

6 Replies

  • you can use the RAND funtion in irule ,try below irule


    when HTTP_REQUEST {
    # Generate a random number between 1 and 3
    set random_num [expr {int(rand() * 3) + 1}]
    if {[string tolower [HTTP::path]] eq "/exampletext"} {
    HTTP::redirect http://abc$random_num\$random_num

  • ASMAPMLTM you can use ragunath154 example but that will be random load balancing using the random function rather than round robin. Why do you have the requirement to load balance the host portion rather than allowing the use of 1 host and then load balancing to all servers that would handle request from the 3 seperate hosts?

    • ASMAPMLTM's avatar
      Icon for Altostratus rankAltostratus

      Well I agree this scenario is different than the ideal solution. Its what application team is pushing.


  • Is this something related with Openshift service url. Because I'm getting confused when you say redirect. Do you want redirect or host header modify & send the traffic to your respective servers which handle each domains.