Share source address persistence accross different VS, pools using unique IP addresses
I am looking for a way to share the source address persistence across virtual servers with different IP addresses and different pools assigned using different IP addresses. Likewise the build in functionality match across services / pools or virtual servers will not work in this case.
The customer uses NetIQ IAM solution that has this specific requirement, let me explain:
VS1 1.1.1.1:443 --> pool 1 -- Pool member 10.0.0.1 (physical server A) Pool member 10.0.0.2 (physical server B)
VS2 2.2.2.2:443 --> pool 2 -- Pool member 10.0.0.3 (physical server A) Pool member 10.0.0.4 (physical server B)
The web application always communicates first to VS1 and goes to pool 1 and for example chooses 10.0.0.1. Source address persistence is applied and stored in the persistence table. After that the client immediately communicates to VS2 and should also arrive on the same physical server A.
So my idea was to create global variables using Irules and saving the persistence information in there, create additional variable to save the client IP address.
Irule1 used for VS1
set ::Poolmember [persist lookup source_addr [IP::client_addr] node
set ::ClientIP [IP::client_addr]
Irule2 used for VS2
In the second VS we compare the value of global variable $::ClientIP with [IP::client_addr] and search for the pool member in the persistence table (we have to know the persistence information of the VS1 connection). If the source IP is the same then we should change the load balancing decision so it will be send to the same physical server A, in this case 10.0.0.3.
If {($ClientIP == [IP::client_addr] && $Poolmember == 10.0.0.1)}
[LB::reselect] node 10.0.0.3 443
There are some shortcomings to this setup I believe as the global variable could be overwritten with a different source IP if there are several concurrent sessions.
Ps: Active passive is not an option as they need capacity.
Does anyone has a better idea that fits this specific requirement?
Thanks,
Marvin