Some of our incoming HTTP requests have a string “UniqueID”, followed by a unique string. We want to load balance the requests such that all requests with the same Unique ID goes to the same server. i.e persist based on URL segment
GET /index.html?UniqueID=12345678 HTTP/1.0
Any request which does not have this value in its URL request should be load balanced to a default group of servers.
We will use csw persist and hash-to-bucket mechanism to achieve this objective.First we will search the URL for the particular string, in this case UniqueID, and then, will hash the value following the string and send it to a server. Same values following the string will always result in same hash value and will be sent to the same server.