Forum Discussion
Message based load balancing for no standard message format
Hi Vincent,
I was trying to configure F5 LTM VE 10.1 to do message-based load balancing but unsuccessful so far. I read your post here (https://devcentral.f5.com/Community/GroupDetails/tabid/1082223/asg/50/aft/2161023/showtab/groupforums/Default.aspx). It seems you were doing something similar to what I'm trying to do. I'm wondering if you could help me. The irules I wrote are relatively simple. Basicly, what I want to do is to extract individual messages received over a single TCP connection and forward them to pool members. The messages have a 8-byte header. The last 4 bytes stores the length of message body. I don't need persistence, which makes the load balancing simpler. However, the problem is USER_REQUEST is never fired after "TCP::notify request" is called.
Thank you in advance!
Shu
____________
iRules:
when CLIENT_ACCEPTED {
log local0.debug "Get a connection"
TCP::collect 1000
}
when CLIENT_DATA {
log local0.debug "in CLIENT_DATA"
binary scan [TCP::payload] II head rlen
if {($head & 0x3) == 1} {
if {[TCP::payload length] < $rlen} {
TCP::collect $rlen
log local0.debug "a message is received"
TCP::release $rlen
TCP::notify request
log local0.debug "requested"
}
}
}
when USER_REQUEST {
Dispatch to the pool
log local0.debug "in USER_REQUEST"
pool my_pool
}
Recent Discussions
Related Content
* 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