Customer Prioritization

This example inspects the cookie in an HTTP request. It uses the value of the cookie to determine which pool to direct the request to. One pool is faster than the other because it contains machines that are reserved for premium users.

A company has a customer base divided into gold and silver membership. It wishes to give priority to the gold customers and has five servers: yellow, green, blue, black, and purple.

Two pools are created: standard, for silver customers, containing machines yellow, green and blue; and premium, for gold customers, which includes all five of the servers. Thus black and purple are only available to gold customers.

The site uses a cookie login system, with the customer type encoded in the cookie. Different membership levels can be detected, and sent to the correct pool:

$cookie = http.getHeader( "cookie" );

if( string.contains( $cookie, "gold" )) {

 pool.use( "premium" );

} else {

 pool.use( "standard" );

}