Forum Discussion

Moorthy_63564's avatar
Moorthy_63564
Icon for Nimbostratus rankNimbostratus
Nov 08, 2010

iRule for caching

dear All,

 

I am new for iRule, i have a LTM setup that is load balancing the proxy pool (Proxy1,Proxy2,Proxy3) When one user access the youtube video through proxy2 and the another user accessing the same video but the traffice should go to proxy2 only because of caching... i hope you understand my needs... i want i rule for caching for the above setup...

 

  • hoolio's avatar
    hoolio
    Icon for Cirrostratus rankCirrostratus
    Hi Moorthy,

     

     

    CARP hashing should work well for this:

     

     

    SOL11362: Overview of the CARP hash algorithm

     

    http://support.f5.com/kb/en-us/solutions/public/11000/300/sol11362.html

     

     

    Aaron
  • Hi Hoolio,

     

    Thanks for your reply, Just can you give me the sample iRule for that.

     

     

    Moorthy

     

  • hoolio's avatar
    hoolio
    Icon for Cirrostratus rankCirrostratus
    The iRule is in the solution I linked to:

    
     From: http://support.f5.com/kb/en-us/solutions/public/11000/300/sol11362.html 
    
    when HTTP_REQUEST {
       persist hash [HTTP::uri]
    }
    

    Aaron
  • Hi Moorthy

     

     

    Sorry for that question but I'm just wondering.

     

    You have loadbalanced proxies for your users right?

     

     

    They can surf arround youtube during business hours?

     

     

     

    Kind regards

     

    bb
  • hoolio's avatar
    hoolio
    Icon for Cirrostratus rankCirrostratus
    Apt comment based on your username :D Some people are treated like adults when they're working... :)

     

     

    Aaron