Contribute Open Script

[BRCD_OS_107] URL Hashing

by Yasir_Liaqatullah on ‎01-20-2012 02:11 PM (248 Views)

Area

Content Inspection

Traffic

HTTP

Description

            This script analyzes incoming requests and selects real server based on url hashing.

Performance Impact

           

            Contact us for our detailed reporting

               or

            Report your own performance estimate

Required Backend configuration

            No special configuration is required

Events and API Used

Events

API

HTTP_REQUEST

OS_HTTP_REQUEST::url

OS_SLB:Smiley Tongueersist

Script source code

# Purpose: Check url and based on url hashing selects real server

use OS_SLB;

use OS_HTTP_REQUEST;

#############################################

#

# HTTP REQUEST EVENTS

#

#############################################

sub HTTP_REQUEST {

       # Get the URL from the request

       my $client_url = OS_HTTP_REQUEST::url;

       # print "\n\nClient url is - $client_url\n\n";

       # sever selection based on url hash

       OS_SLB:Smiley Tongueersist(“hash-to-bucket”, “$client_url”);

}