Hi Jellf,
Sorry, but I don't think I have time today for an involved discussion on this. And in general I think this site prefers we keep communication to the board so other people can benefit from the discussion.
In general, if you want to select a pool based on the client IP address, you can use a datagroup of a type 'address'. In the datagroup you could define all of the client IP addresses or subnets you want sent to pool 1. You could then use a simple iRule on the virtual server which checks if the client IP address is part of that datagroup. If so, you would select pool 1. If not, you would use the default of pool 2. Here is an example of this:
when CLIENT_ACCEPTED {
log local0. "[IP::client_addr]:[TCP::client_port]: New TCP connection to [IP::local_addr]:[TCP::local_port]"
Check if client is in the pool1_client_class
if {[matchclass [IP::client_addr] equals pool1_client_class]}{
Client is in the datagroup, so use pool_1
log local0. "[IP::client_addr]:[TCP::client_port]: matched pool1_client_class datagroup"
pool pool_1
}
The default for non-matching clients is to use the VIP's default pool (pool_2)
}
Note: If you are running 9.4.3 or lower, change pool1_client_class to $::pool1_client_class as this is the old way to reference a datagroup from an iRule.
For details on the commands used, you can check these wiki pages:
iRule events
http://devcentral.f5.com/wiki/default.aspx/iRules/events
matchclass command
http://devcentral.f5.com/wiki/default.aspx/iRules/matchclass
If you want detailed architectural or implementation suggestions, you should be able to contact your F5 presales or account manager.
Aaron