Forum Discussion

kmtmt_51646's avatar
kmtmt_51646
Icon for Nimbostratus rankNimbostratus
Oct 26, 2012

Multiple Ramcache profile inside 1 iRule?

Dear all members,

 

 

I ran into a weird request from the customer and I wasn't able to figure out how to solve this issue, so any advice will be VERY appreciated it.

 

 

Here's customer's request:

 

1) use Ramcache feature on Virtual Server(HTTP)

 

2) PC browser, iPhone, and Android will access to this VS

 

3) Servers' responce data(such as .html or .css) differs depening on client devices (but request URIs are the same)

 

4) so they want to ramcache for PC contents, iPhone contents, and Android contents separately

 

 

if you configure 1 Virtual Server, you can only bind 1 ramcache profile so contents for PC, iPhone, and Android will mixed together, which result in PC usrs see the website in iPhone mannar... :-/

 

 

 

the idea I can think of was to have BIG-IP to insert an extra path to request URI depending on PC, iPhone, Android so that request URI changes.

 

e.g.)

 

 

original request URI : http://www.example.com/test/index.thml

 

modified URI for PC : http://www.example.com/pc/test/index.thml

 

modified URI for iPhone : http://www.example.com/iphone/test/index.thml

 

modified URI for Android : http://www.example.com/android/test/index.thml

 

 

 

Does anyone can help please?

 

 

Best Regards,

 

mtmt

 

2 Replies

  • Couldn't you reduce the complexity and do something based on the User Agent? Regardless, RAMCache takes this into account anyway;

     

     

    "Cached content by default is stored with a unique key referring to both the resource to be cached and the User-Agent for which is was formatted." - From: https://devcentral.f5.com/wiki/iRules.CACHE__useragent.ashx
  • Hi What Lies Beneath, I appreciate your reply! (and my apology for the delay)

     

     

    It worked as the customer requested, and as you say, it should be more simple but the application is already made in this way unfortunately...

     

     

    I also found SOL that describes Ramcache and vary HTTP header here:

     

    http://support.f5.com/kb/en-us/solutions/public/5000/100/sol5157.html?sr=24922502

     

     

     

    Thank you for your help, you save a lot.

     

     

    kmtmt