Forum Discussion
Jamey_Price_105
Nimbostratus
Oct 21, 2006Setting the Pool in STREAM_MATCHED
We're setting up a pool of load-balanced Lotus Notes boxes to provide webmail. One of the machines (currently, anyways) has a redirector set up so once you've logged in, if the machine you logged into isn't your mailserver it'll do a javascript-based redirect to send you to the right machine. It'd be nice if it did a 302 instead since that'd be MUCH easier to catch, but instead I just set up a stream profile and watch for the name of any of the machines it could redirect you to and replace them with the hostname on the Big-IP I'm proxying everything through. However, once I do that I need to ensure that all your future requests go through the mailserver it tried to redirect you to.
According to what I'm logging, this is working fine. According to what I'm actually seeing in the pool network statistics, and the fact that it can't find the mailfile, it isn't working.
when STREAM_MATCHED {
This is the mailserver you're being redirected to, its hostname specifically. Fix this to use string tolower later.
set mailserver [STREAM::match]
This name::lookup doesn't actually work, dunno why.
set serverip [NAME::lookup $mailserver]
set currpool [LB::server pool]
set currpoolmember [LB::server]
The Wiki says that pool commands MUST be in an if/else structure, so here's one.
if { $mailserver ends_with "jwt.com" } {
log "Mailserver matched jwt.com, setting pool to $mailserver instead of $currpool"
I set up pools with the names of each of the mailservers.
pool "$mailserver"
} else {
This shouldn't actually ever trigger, and doesn't seem to.
log "Mailserver didn't match jwt.com, setting pool to $currpool instead of $mailserver"
pool "$currpool"
}
}
Can someone perchance tell me what I'm missing/doing wrong that's preventing me from actually getting further requests from this client to go to the correct pool?
Much obliged,
Fish
11 Replies
- Deb_Allen_18Historic F5 AccountJust want to throw my 2c in here to say be careful assigning session-/connection-specific values to global variables. Global variables are shared between connections, so if 2 clients are active, you may get unexpected results.
Often the session table is the best place to store persistent data for specific clients, assuming there is some persistent key (client IP often meets that requirement)
HTH
/deb
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