in NetScaler, Traffic Management

Content Switching Quick and Dirty

Here is an idea on how to create a Content Switch, and hook up lots and lots (and lots) of  VServers based on HTTP.REQ.HOSTNAME.

Step 1: Create the VServers, each with a unique prefix (i used LBAUTO_[fqdn]), but containing the fqdn…

  • etc…

Step 2: Create a Contentswitch Action (Expression based), and a policy…

Bind it to the Content Switch.

If the HOSTNAME is not found as an LBAUTO_[fqdn] vserver, the contentswitch will proceed with the normal contentswitch policies…

As an alternative, you might want to consider using a Stringmap as a way to easily decide to which vserver a request should go to.

Have fun!

What do you think?

Comment

  1. Nice one, Roel! Very creative…

    you’re missing a double-quote at the end of this line…

    add cs action CSA_LBAUTO -targetVserverExpr “\”LBAUTO_\” + http.REQ.HOSTNAME”