Forum Discussion

Jamey_Price_105's avatar
Jamey_Price_105
Icon for Nimbostratus rankNimbostratus
Oct 21, 2006

Setting 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