Forum Discussion

sandiksk_35282's avatar
sandiksk_35282
Icon for Altostratus rankAltostratus
Sep 28, 2016

irule to direct traffic for a different pool

Need to direct particular user traffic to a different pool. This is all HTTPS traffic. when user access https://abc.com they need to be fwded to poolA. When the request comes in as https://abc.com/CustomerDetails , or /WebOfferList or /MembershipEdit they need to be fwded to poolB

 

Need assistance with the irule

 

  • Here you go: (BTW, this could be made a LOT simpler, but this will give you the foundations for flexibility later 🙂 )

    when HTTP_REQUEST {
        switch -glob -- [string tolower [HTTP::uri]] {
            "" -
            "/" {
                pool poolA
            }
            "/customerdetails*" {
                pool poolB
            }
            "/webofferlist*" {
                pool poolB
            }
            "/membershipedit*" {
                pool poolB
            }
        }
    }
    
  • I am not seeing traffic hitting the irule , by default all the traffic is going to default pool . how can i troubleshoot this.