Forum Discussion
Debbie_123533
Nimbostratus
Sep 05, 2013Layer 7 Application Routing?
Hello, I am extremely new to F5 and iRules and I have NO programming background. I need to create an iRule that will load balance our applications between 2003/2008 servers. Currently, we have about ...
Kevin_Stewart
Employee
Sep 05, 2013Okay then. Since all of the applications live under different URIs of the same host. Example:
www.example.com/app1
www.example.com/app2
www.example.com/app3
You could build a data group that maps URIs to pools. Example:
Datagroup (ex. my_uri_dg):
"/app1" := "app1_2003_pool"
"/app2" := "app2_2003_pool"
"/app3" := "app3_2003_pool"
"/app4" := "app4_2003_pool"
"/app5" := "app5_2003_pool"
And then an iRule like this:
when HTTP_REQUEST {
if { [class match [string tolower [HTTP::uri]] starts_with my_uri_dg] } {
pool [class match -value [string tolower [HTTP::uri]] starts_with my_uri_dg]
}
}
You'll need to create a separate pool for each application, and then when you want to upgrade an app, simply create the new pool and modify the datagroup entry.
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