Forum Discussion

hamzah_278's avatar
Icon for Nimbostratus rankNimbostratus
Oct 19, 2023

HTTP Redirect with Pool in iRules

Hai. I want to know is there any way to create irules with condition that if user hit it will redirect consecutively between and Those ip already known in one pool named "Pool_sta"

Thank you for your help

4 Replies

  • Im not sure if I understand you correctly but you dont need any irule for that. 

    Create your vs, create a pool with correct loadbalancing method (least connection is my recommendation but) in your case its roundrobin, attatch it to your vs and your good to go.

    If you need that under an existing vs you could do this with LTM Policy (preferred over irule). Just create a new LTM Policy with condition "if host header is forward traffic to pool Pool_sta"

    and your Pool_sta need the correct loadbalancing method. 

    • hamzah_278's avatar
      Icon for Nimbostratus rankNimbostratus

      I already try that, but because the domain of have different ip with and 11. It wont redirect and keep stuck with the ip of With this condition is still needed an iRules?

      • P_Kueppers's avatar
        Icon for MVP rankMVP

        I dont understand exactly what do you mean by the domain got different IPs? I though those IPs where ur pool members?

        Normally you have your domain with dns records with one ip address of your bigip virtual server. So domain is pointing on bigip vs. There you can loadbalance with default pool or if you need multiple things loadbalancing to different pools you can do this with LTM Policy (or iRules but first would be preffered)

  • Hi Hamzah,

    I see you already created a pool with the two nodes. You'd only need to get a different IP to be used as a virtual server, and then attach the pool to the new virtual server created. You don't need an iRule for this setup.