st0n3_87491
Aug 13, 2009Nimbostratus
Persistence based on IMAP-User
Hi there,
as topic say I would like to have a persistence to a node based on his IMAP-Userlogin.
I managed to find out this using a stream Profile and wrote this iRule so far:
when CLIENT_ACCEPTED {
STREAM::expression @LOGIN\.*@
STREAM::enable
event STREAM_MATCHED enable
}
when STREAM_MATCHED {
set match [getfield [STREAM::match] " " 2]
set client "[IP::client_addr]:[TCP::client_port]"
set vip [IP::local_addr]:[TCP::local_port]
set node "[IP::server_addr]:[TCP::server_port]"
log local0.info "$match $client $vip $node"
STREAM::disable
}
This iRule now just logs
Jul 15 19:08:54 tmm tmm[1867]: Rule persistence_irule_user : nocppp XX.XX.XXX.XXX:XXXXX(CLIENT-IP: PORT) XXX.XXX.XXX.XXX:XXX(VIP-IP: PORT) XXX.XXX.XXX.XXX:XXXX(NODE-ID: PORT)
As already mentioned in the next step I would like to have a persistance based on that LOGIN/Client-IP: PORT.
How can I manage this?
Next question is what happens to the persistent requests when the node goes down?
Maybe there are totally other solutions for that...because I have a performance issue on that solution, too.
Thanks in advance
Christian