Learn F5 Technologies, Get Answers & Share Community Solutions Join DevCentral

Filter by:
  • Solution
  • Technology

Direct traffic to pool member according to client connection by bytes

Can anyone help me for IRule to direct the traffic to certain pool member according to client request measured by byte when access VIP

for example if client request connection is 3 packet/byte >> direct this request to pool member x.x.x.x

we need just to direct the connection according to KB or Byte for client connection

Rate this Question

Answers to this Question


This is a strange requirement, but here goes:

I suspect you may have to do your own accounting.

For each connection, you can initiate TCP::collect.

With no argument specified, the event CLIENT_DATA will fire for every packet received, and you can count packets like that.

Otherwise, you can specify bytes, and the event will fire after the set number of bytes (at least) is received.

Once you've reached the counts you want then you can call pool command to redirect the traffic accordingly.

On the small chance that you're at a service provider trying to do traffic accounting, I am almost certain there are more efficient ways of doing something like this at scale, and you should probably engage with a consultant or architect to evaluate.

Comments on this Answer
Comment made 22-Sep-2017 by BinaryCanary

Interestingly, after writing this, I found out that IP::stats provides some of this data, so this could simplify the task for you.

Comment made 23-Sep-2017 by MR.Freddy 68

Can you help me on sample of this irule ?