Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Andreas Gehrke 1 post 21 karma points
    Jul 20, 2011 @ 13:11
    Andreas Gehrke
    0

    Using Umbraco 4.7.X in an IIS web garden

    Hello

    I have read posts about Umbracos inability to function on an IIS website with an app pool that can spawn multiple processes (a web garden). However most of these posts are quite old, so Im looking for more up to date information. Does anyone have experience with Umbraco 4.7 running in a web garden? What kind of problems could I face?

    Best regards,
    Andreas Gehrke

  • Iain Martin 49 posts 71 karma points
    Jul 20, 2011 @ 16:28
    Iain Martin
    0

    We had this issue recently whereby we would update a page in the backend and it wouldn't refresh every time on the main site. We went through all sorts of tests to try and figure out what was going on with no obvious answers - in fact it got to the state that we were seriously considering ditching Umbraco completely.

    Eventually I had a look at the IIS installation and discovered that it was set up to use 5 worker processes - which explained the updated page appearing every 5th refresh! Set it back to a single worker process and it now works correctly. Don't really  know why it was set up as a web garden - I've set up loads of sites and never had to set the worker processes to a single entity before, so not sure wht IIS decided to do it this time.

    So, no Umbraco doesn't work on a web garden, so don't even go there!

    Iain

  • Andreas Gehrke 20 posts 44 karma points
    Jul 21, 2011 @ 12:09
    Andreas Gehrke
    0

    Hi Lain

    Thanks for your reply. That's bad news. I have setup up a small test on my dev machine and configured the app pool to use three worker processes and I can confirm the behavior you are describing.

    Does anyone have experience with high traffic Umbraco sites? Have you used a HTTP accelerator like Varnish?

    Thanks,
    Andreas

  • Steve Megson 150 posts 942 karma points MVP c-trib
    Jul 21, 2011 @ 13:40
    Steve Megson
    0

    The problem arises because Umbraco keeps an in-memory cache of the site's content. In a web garden, each worker process has its own cache, and only the process that published the new page will know to update its cache. The other worker processes continue to serve pages from their now out-of-date caches. For a web farm you can put a list of servers in web.config and the servers will use a web service to notify each other when to refresh the cache, but that doesn't help you with a web garden because you can't choose which worker process your requests hit.

    I don't think it would be too difficult to modify Umbraco to notice when another process has updated content, in fact it could probably be done in a package. However, there'd be some overhead to that, and I'm not sure why you want a web garden in the first place. A single worker process should quite happily keep all your CPUs busy, so moving to a web garden is mostly introducing complexity and memory overhead for little or no benefit.

    Steve

  • Arpicheck 27 posts 77 karma points
    Apr 05, 2013 @ 11:39
    Arpicheck
    0

    Thank you Steve.

    I see the reasons, and you abosultely have right. If the hosting would be done on my own server, I would set the process number to one. I understand that the effect is produced by the multiple instances, and the caching mechanism behind.

    I still think, it would be a good idea to have an option to turn off this kind of cache, or support the instances with some kind of communication. I'll try to solve this from code, but I thought, Umbraco is providing a solution out of the box. I was wrong.

  • Paul Davis 1 post 21 karma points
    Jul 21, 2014 @ 12:51
    Paul Davis
    0

    I'm relatively new to Umbraco, but I have been looking at this exact issue for our public web site.

    Is it not as simple as setting the disk and memory cache config to the following?

    <!-- Enable / disable xml content cache -->
    <XmlCacheEnabled>True</XmlCacheEnabled>
    <!-- Update disk cache every time content has changed -->
    <ContinouslyUpdateXmlDiskCache>True</ContinouslyUpdateXmlDiskCache>
    <!-- Update in-memory cache if xml file is changed -->
    <XmlContentCheckForDiskChanges>True</XmlContentCheckForDiskChanges>

    Each worker process within the web garden would then be sync'd with the xml disk cache. When one worker process updates it's own cache, that change is written to disk and the other worker processes will reload their caches based on the disk file having changed.

    It seems to be working fine on the three worker processes I have on my test environment. More testing required of course :)

    Thoughts? Comments?

  • Steve Megson 150 posts 942 karma points MVP c-trib
    Jul 21, 2014 @ 15:26
    Steve Megson
    0

    Yes, that will now work. The XmlContentCheckForDiskChanges setting was added in 4.8, so it wasn't available when this thread started.

Please Sign in or register to post replies

Write your reply to:

Draft