the thing is that it shouldn't be static, I want that this information (table/array) will be synced between both F5.
Let me explain what I am trying to achieve, I have demand to create mapping between virtual server to a node, that means the for N VS I will have N nodes and map on to one, in addition I have on server that it is the backup for all the servers and if one fails the backup server and the failed server are switched (the VS map changes to the backup and the the failed server become to be the backup server).
I need this mapping will be synchronized between the F5 and this is why I want to use the tables because as far as I know the tables are synced.
Since that I am not able to create the mapping in the rule init I did it on the client accepted:
when CLIENT_ACCEPTED {
set Server_IP [table lookup -subtable "Server_Map" [IP::local_addr]]
if {[table lookup -subtable "BacupServer" 1] eq ""}{
set BckSrv "[class search -value Backup eq 1]"
table set -subtable "BacupServer" 1 $BckSrv indefinite
}
if {$Server_IP eq ""}{
set Server_IP "[class search -value ProxyIP eq [IP::local_addr]]"
table set -subtable "Server_Map" [IP::local_addr] $Server_IP indefinite
}
set status "[LB::status node $Server_IP]"
if {$status eq "down"}{
set BackupServer [table lookup -subtable "BacupServer" 1]
table set -subtable "Server_Map" -mustexist [IP::local_addr] $BackupServer
table set -subtable "BacupServer" -mustexist 1 $Server_IP
set Server_IP $BackupServer
}
node $Server_IP
}
I hope that I am clear on what I am trying to achieve, if not please let me know I will try to be more clear.
Thanks a lot!
🙂