Forum Discussion
johndegern_4568
Nimbostratus
Mar 29, 2010How many redirects can I have in a single iRule?
I have a project where I would like to use BigIP to redirect 200+ domains to different domains. Sometimes to a host::uri.
How many "If Else" can one have in an iRule? Would a better ap...
hoolio
Cirrostratus
Mar 30, 2010You could chain 200 if/elseif.../else together, but it would get a bit unwieldy. You could still use a datagroup in 9.3.1. But you'd use matchclass or findclass to search the class. ~200 lines shouldn't add a lot of overhead but it's always good to do performance testing if you can before using a rule like this in production. If the redirects are all of the same VIP, it would be best to combine the redirects in a single iRule. This helps you avoid attempting to send multiple redirects on the same request (which triggers a runtime TCL error).
For details you can check the various wiki pages:
http://devcentral.f5.com/wiki/default.aspx/iRules/matchclass
http://devcentral.f5.com/wiki/default.aspx/iRules/findclass
http://devcentral.f5.com/wiki/default.aspx/iRules/timing
Aaron
Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects