RTSP persistence healp

I have a customer that wants to persist on dynamic RTSP uri’s. They want to load balance all sessions and have no persistence, but, keep track of the uri and the server that has that content and the next user with the same uri gets load balanced to that server with that content.

Will this rule work? What is the best method to do this?

Thanks,

rule rtsp_uri_sticky {

when RTSP_REQUEST {

set rtsp_uri [crc32 [RTSP::URI]]

persist hash $rtsp_uri

}

}

Sorry I was not very clear. Essentially, the requirement is that if a user requests a specific piece of content from a server, we need to send any subsequent requests for that specific piece of content back to the same server since the content will be cached on the server.

It sounds like what you really want is persistence by request. In that case, take a look at a recent runner up in the iRule contest: DevCentral - An F5 Technical Community. The one I’m referring to is second from the bottom, regarding “Load Balance the HTTP Request by Hash(url) for CacheServer”. It should be no problem to adapt that rule for RTSP requests.