Forum Discussion

Brandon_Burns_8's avatar
Brandon_Burns_8
Historic F5 Account
Feb 13, 2007

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

 

}

 

}
  • Brandon_Burns_8's avatar
    Brandon_Burns_8
    Historic F5 Account
    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.
  • spark_86682's avatar
    spark_86682
    Historic F5 Account
    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: http://devcentral.f5.com/Default.aspx?tabid=103. 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.