Forum Discussion

VictorJesus_178's avatar
VictorJesus_178
Icon for Nimbostratus rankNimbostratus
Dec 01, 2014

persistenceKey not working

Hi all,

I'm having some trouble trying to create an iRule in order to keep a persistence route for 30mins for the clients where in the URI contains either subscriberId= or userId= This way I want that the subcriber ends up by being answered by the same BE server during 30 mins. Any help please? something wrong with my iRule?

Example HTTP call:

GET /RE/REController.do?method=getContextRecommendation&contentSourceId=2&clientType=603&subscriberId=s100081010&numRecommendations=10 HTTP/1.1

iRule:

when HTTP_REQUEST {
     if { [HTTP::uri] starts_with "/RE/REController.do?method=get" } {

     set persistenceKey ["[URI::query [HTTP::uri] "subscriberId"]-[URI::query [HTTP::uri] "userId"]"]
     persist uie $persistenceKey 1800 
     log local0. "connect request (ThinkAnalytics Recommendation Engine) using session persistence key: $persistenceKey for 1800s (30m)" 
     }
}

4 Replies