« Previous Next »

Thread: Output Caching and Multiple Servers

Last post 05-04-2009 11:30 PM by steve schofield. 9 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (10 items)

Sort Posts:

  • 04-22-2009, 6:24 PM

    • metacosm
    • Not Ranked
    • Joined on 04-22-2009, 9:46 PM
    • Posts 4

    Output Caching and Multiple Servers

    I am looking for a straight-forward way to share the output cache among multiple servers and looking for recommendations.  For example, assume we have 3 servers, when server #1 is accessed and creates its output cache, I would like that cache accessible to the other 2 servers.

     

    Is it possible to pool the output cache?  Can you do this with/without clustering?  Any out of left field recommendations?

    -- MetaCosm
  • 04-22-2009, 7:18 PM In reply to

    Re: Output Caching and Multiple Servers

    I cannot think of anywhere where I have seen this.

    I would just have the caches on each server and use load balancing sticky sessions/affinity and force the client to go to that server in the farm each time.

  • 04-22-2009, 9:11 PM In reply to

    • metacosm
    • Not Ranked
    • Joined on 04-22-2009, 9:46 PM
    • Posts 4

    Re: Output Caching and Multiple Servers

    Rovastar:

    I would just have the caches on each server and use load balancing sticky sessions/affinity and force the client to go to that server in the farm each time.

     

    This isn't a standard client<->server arrangement.  Many of these requests are worker requests going server to server (WebMethods), and will be tearing the servers up some.  Being sticky is often the exact opposite of what we require.  The box the initial request lands on might have some local worker processes, but many of them will be farmed out to other boxes.

     

    Rather than having all the work be done by server #1, the work for a single process, is distributed across three boxes.  All our load balancing is adaptive and responsive, and our requests even box to box are going through a load balancer. 

     

    As we scale, obvious, at 3 boxes, having 3 sets of cache generated isn't that horrible.  At 30 boxes, it is a little more insane.  At 300 boxes, having 300 personal cache with massive overlap, is probably not what we want. 

     

    Some of our cache items are expensive to generate, with long-life and are not client specific.

    -- MetaCosm
  • 04-22-2009, 9:42 PM In reply to

    Re: Output Caching and Multiple Servers

    I am getting a little confused. I don't really understand your setup and what you are trying to do.

    The output cache will be stored in memory you want to access this memory from another machine? I don't think that is possible.

    Or do you want move this cache information in memory to another server's memory? *shrug* Don't think this can be done either.

    There might be some programmable way to do this but it beyond the scope of these forums. Maybe forums.Asp.net can help you.

    It sounds to me like you need to tier your web architecture better (it sounds like you are not doing it at all) so the heavy tasks that you want to cache are fixed on one or two tiers away from the other tiers (frond end, etc). This way you can have memory heavy machines on these app tiers for each task and cache them.

    Either way to use the caching you will still need to go to the same boxes and you will possibily need another load balancering setup to control the sticky/affinity for this app tier. So I don't understand the comments that 'sticky is often the exact opposite of what we require'.

  • 04-22-2009, 11:11 PM In reply to

    • metacosm
    • Not Ranked
    • Joined on 04-22-2009, 9:46 PM
    • Posts 4

    Re: Output Caching and Multiple Servers

    Rovastar:

    The output cache will be stored in memory you want to access this memory from another machine? I don't think that is possible.

    That was one idea, to put it into a pool, or possibly wire up an alternative storage location (ala: memcached), that is shared among the servers.  I was hoping someone would just say "Wow, you didn't know about FooSharedSpace, learn to google" or something similar. 

     

    Rovastar:

    Or do you want move this cache information in memory to another server's memory? *shrug* Don't think this can be done either.

    Not move, but copy it to another machines memory.  Effectively take the cache that was just created on server 1, and push it out to server 2 and server 3.

     

    Rovastar:

    There might be some programmable way to do this but it beyond the scope of these forums. Maybe forums.Asp.net can help you.

     

    Our application isn't in .net, and our IIS modules are in native C++.

     

    Rovastar:
     

    It sounds to me like you need to tier your web architecture better (it sounds like you are not doing it at all) so the heavy tasks that you want to cache are fixed on one or two tiers away from the other tiers (frond end, etc). This way you can have memory heavy machines on these app tiers for each task and cache them.

     


    We don't have heavy "tasks", we have heavy "users".  The task weight varies order of magnitudes based on the user type / state.  It makes is a challenge to balance based on the good old "all profile updates happen on box X".  Our solution was to allow all machines to accomplish all tasks, so when a heavy task hits a box, the adaptive load balancer will automatically route new tasks (even of the same type) to boxes that aren't loaded down.

     

    Rovastar:
      

    Either way to use the caching you will still need to go to the same boxes and you will possibily need another load balancering setup to control the sticky/affinity for this app tier. So I don't understand the comments that 'sticky is often the exact opposite of what we require'.


    See my last response for why 'sticky is often the exact opposite of what we require'.

     

    By the way, sincere thanks for taking the time to try to help me out Rovastar, I know I have a complex issue.  It seems like their are no obvious, easy answers that I missed on google thus far. 

    -- MetaCosm
  • 04-23-2009, 7:10 AM In reply to

    Re: Output Caching and Multiple Servers

    Now I am confused at what you mean by output cache. My understanding of output cache is to cache some parts of dynamic web pages .net, etc. also more confusing as there is something in asp.net called output cache that does it natively in the .net framework I understand.

    I don't understand how this works for an IIS module or even if it it works at all. It doesn't seems to make sense. I can only presume you have accessed these commands in code to use the output cache.

    I still think you could do with tiering your infrastructure though even if it is just based on teh perceived complexity of the task in hand.

     

     

     

     

  • 04-23-2009, 1:08 PM In reply to

    • anilr
    • Top 10 Contributor
    • Joined on 05-23-2006, 10:13 PM
    • Redmond, WA
    • Posts 2,343

    Re: Output Caching and Multiple Servers

    There is no solution to sharing in-memory output cache between multiple machines.  ARRv2 has a disk cache feature that can either use individual or shared disk drives.  Of course, you would also need to use ARR for your load-balancing.

    Anil Ruia
    Senior Software Design Engineer
    IIS Core Server
  • 05-03-2009, 11:31 PM In reply to

    Re: Output Caching and Multiple Servers

    Look at www.scaleoutsoftware.com for a distributed caching, session sharing.

    Steve Schofield
    Windows Server MVP - IIS
    http://weblogs.asp.net/steveschofield


    http://www.IISLogs.com
    Log archival solution
    Install, Configure, Forget
  • 05-04-2009, 2:54 AM In reply to

    • metacosm
    • Not Ranked
    • Joined on 04-22-2009, 9:46 PM
    • Posts 4

    Re: Output Caching and Multiple Servers

    steve schofield:

    Look at www.scaleoutsoftware.com for a distributed caching, session sharing.

     

     

    Wow, perfect.  The geo-product they offer seems like a good fit for our long term plans as well.  All my hunting around never turned up this product.  Thanks so much!

    -- MetaCosm
  • 05-04-2009, 11:30 PM In reply to

    Re: Output Caching and Multiple Servers

    Scaleout is a good product, they have great support too.   Here is another idea to look at by MS, it's called Velocity (not sure if it's prod or not).

    http://msdn.microsoft.com/en-us/data/cc655792.aspx

    Steve Schofield
    Windows Server MVP - IIS
    http://weblogs.asp.net/steveschofield


    http://www.IISLogs.com
    Log archival solution
    Install, Configure, Forget
Page 1 of 1 (10 items)
Microsoft Communities