Forum Discussion
HTTP Redirect with Pool in iRules
Hai. I want to know is there any way to create irules with condition that if user hit production.company.id it will redirect consecutively between 172.16.1.10:8221/note and 172.16.1.11:8221/note. Those ip already known in one pool named "Pool_sta"
Thank you for your help
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 production.company.id forward traffic to pool Pool_sta"
and your Pool_sta need the correct loadbalancing method.
- hamzah_278Nimbostratus
I already try that, but because the domain of production.company.id have different ip with 172.16.1.10 and 11. It wont redirect and keep stuck with the ip of roduction.company.id. With this condition is still needed an iRules?
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.
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com