Forum Discussion

Scott_McCool_11's avatar
Scott_McCool_11
Icon for Nimbostratus rankNimbostratus
Dec 14, 2006

Feasibility/examples: pseudo-QoS based on header

 

As we work to add capacity to our website, one of the things we'd like to do is ensure that paying customers receive the best possible experience (at the expense of "public" users if need be).

 

 

We've made basic steps in this regard by limiting spiders to a pool made up of a subset of our nodes, etc but we'd like to go further.

 

 

I can identify paying customers based on a custom HTTP header being added by our content delivery network, and sometimes by authorization data in the headers. What I'd like to do is take X servers, create a pool of all X to which "paying customers" are sent, a pool containing a subset of X for all other visitors, and an even smaller pool for spiders.

 

 

Does anyone have examples or a high level overview of how they've solved a similar problem? The custom HTTP header I refer to would be a source IP address that is added to every request, but I'd want to match to a particular list/range....

 

 

Is this feasible?

1 Reply

  • Do you have rate shaping licensed? If so, check out this post for an example of how to set a rate class for specific requests (Click here)

    Else, it should be fairly simple to send requests from one "class" of clients to a pool and send another set of clients to another pool.

    The format for the rule would be:

    
     check for first class of users
    if { [HTTP::header some_header_name] contains "some string"]} {
       log local0. "client [IP::client_addr] sent to best_pool"
       pool best_pool
    }
    elseif { [HTTP::header some_header_name] contains "some other string"] }{
       log local0. "client [IP::client_addr] sent to other_pool"
       pool other_pool
    }
    else {
       log local0. "client [IP::client_addr] sent to default_pool"
       pool default_pool
    }

    The log statements will be written to /var/log/ltm.

    This post has a good example for identifying spiders using a class (datagroup in the GUI): Click here

    And this post has a good explanation of how to identify spiders by the User-agent header: (Click here)

    Keep in mind though, that a malicious client can send any header name and value they want, so you may not want to trust the header names and values explicitly...

    Aaron