cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple sites - same nodes as pool - monitoring sites independantly

SOLVED
Highlighted

Multiple sites - same nodes as pool - monitoring sites independantly

Hello,

We would like to achieve the following :

multihead.domain.tld = Traffic IP Group / VIP

Above VIP takes traffic from both

- www.domain.tld

- somethingelse.domain.tld

... and sends to same VS.

Pool = node01.domain.local:80, node02.domain.local:80

If somethingelse.domain.tld does not answer with i.e. a regex on node01.domain.local - or similar monitor, we would like to stop traffic to that node - but only for the site somethingelse.domain.tld. Not for www.domain.tld, which should continue to use both nodes.

How could one achieve such a setup?

Aware that we can make additional pools per trafficgroup / VS, is that the way to go instead?

Best regards

Bjarke Emborg Kragelund

1 REPLY
Contributor

Re: Multiple sites - same nodes as pool - monitoring sites independantly

Monitors are pool wide. To ensure one monitor does not stop traffic for both sites you will need to use separate pools. This can be accomplished a few ways (separate VS, pools, or traffic script rules).

This method using a single VS/TIP with a rule and multiple pools,assumes the pool names are the same as the host header. This works good if you have a large number of sites, and can be adjusted for static pool names.

Pool "www.domain.tld" = node01.domain.local:80, node02.domain.local:80

Pool "somethingelse.domain.tld" = node01.domain.local:80, node02.domain.local:80


$hh = http.getHostHeader();



#If a hostheader named pool does not exist, STM will log a message


# rule will terminate on pool.use()


if( pool.activeNodes( $hh) >= 1 ) pool.use( $hh);



# If the hh is not a named pool send a HTTP 301 redirect


http.changeSite( "http://www.riverbed.com" );













*Confirm that pool.use with variables is acceptable for your deployment. You will need enable the "trafficscript!variable_pool_use" global setting  to "Allow the pool.use and pool.select TrafficScript functions to accept variables instead of requiring literal strings. " Note the "Enabling this feature has the following effects" section of in the UI.

Also see Owen Garrett comments Select Pool based on host header

If you only have a few sites the alternative a static rule is good option. This does not require a global setting change and adds the pool names to the home page of the UI. With a hundred sites the UI update is not an advantage. *pool.activeNodes is optional.


$hh = http.getHostHeader();



if( $hh == "www.domain.tld" ) {


   # rule will terminate on pool.use()


   if( pool.activeNodes ( "www.domain.tld" ) >= 1 ) pool.use( "www.domain.tld" );


}


if( $hh == "somethingelse.domain.tld" ) {


   # rule will terminate on pool.use()


   if( pool.activeNodes ( "somethingelse.domain.tld" ) >= 1 ) pool.use( "somethingelse.domain.tld" );


}


# If the hh is not above, send a  HTTP 301 redirect


http.changeSite( "http://www.riverbed.com" );