Forum Discussion
Gill_32697
Nimbostratus
Nov 13, 2012uri limit count
All, I need to expand my URI Redirect. I currently have 8 uri paths defind. The Web Developers want to start migrating more sites, may be between 350 to 400 uri's. Is there a limit how many URI's per iRule or before any degradation?
Thanks, Gill
4 Replies
- What_Lies_Bene1
Cirrostratus
There's few technical limits. However, from a management and performance point of view, I'd hope you're using Data Groups. - hoolio
Cirrostratus
As Steve said, you can add the redirects as name=value pairs to a data group and scale it up to ~100,000 entries in current versions. The performance shouldn't be impacted significantly by higher numbers of entries as it's a hashed list.
https://devcentral.f5.com/Tutorials/TechTips/tabid/63/articleType/ArticleView/articleId/1086424/Comparing-iRule-Control-Statements.aspx
You can use the class command to look up the requested URI and map it to the new URI.
https://devcentral.f5.com/wiki/iRules.class.ashx
Aaron - Gill_32697
Nimbostratus
i've never used data groups, looking at default groups list i see ip address, my uri's are
//sitename/uri-path1
//sitename/uri-path2
//sitename/uri-path3
etc....how would i use data groups..give me an idea and I can reseach and give it a try. I want to use best practrice. - hoolio
Cirrostratus
Here is an untested example. Define the data group separately and then add the iRule to the virtual server.v10.x data group mapping old URIs to new URIs Define this in the GUI under iRules | Data Group List or by merging this config into your existing config: class uri_mapping_dg { { "/old_uri1" { "/new_uri1" } "/old_uri2" { "/new_uri2" } } } v11.x data group: ltm data-group internal uri_mapping_dg { records { /old_uri1 { data /new_uri1 } /old_uri2 { data /new_uri2 } } } iRule which looks up the client requested URI to get a match when HTTP_REQUEST { log local0. "[IP::client_addr]:[TCP::client_port]: [HTTP::method] to [HTTP::host][HTTP::uri]" Check if URI starts with a URI from the mapping data group set redirect [class match -value [HTTP::path] starts_with uri_mapping_dg] if {$redirect eq ""}{ Take some default action for URIs which do not match the data group? log local0. "[IP::client_addr]:[TCP::client_port]: No match for [HTTP::uri]" } else { HTTP::redirect $redirect log local0. "[IP::client_addr]:[TCP::client_port]: Redirecting to $redirect" } }
Aaron
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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