how to select a different virtual server's current pool?
We're working up websocket support and sending websocket connection attempts to a specific application pool.
- www VIP uses pool www_default (usually).
- app VIP uses pool app_default (usually).
The following iRule is applied to our 'www' vip:
when CLIENT_ACCEPTED {
HTTP::enable
}
when HTTP_REQUEST {
if {[HTTP::header value "Upgrade"] equals "websocket"} {
if { ( [class match [HTTP::uri] starts_with WebSocketUris ] ) } {
pool app_default
HTTP::disable
return
}
}
}
That works great. It skips apache behind the www pool (with either no or bleeding edge support for websockets so no thanks) and sends directly to the apps.
However...
The problem is the statically defined 'app_default' pool. When we need to update the nodes behind app_default, we'll change the virtual server 'app' to use 'app_shunt'.
So... how can I have an iRule on the 'www' vip send traffic to the pool currently set on the 'app' vip? Or get the name of the pool currently in use on the 'app' vip from an irule on the 'www' vip (which would lead directly to setting the pool).
I'm completely flummoxed.
Thanks, chris