Question

I'm currently running Umbraco 4.7.1.1.  I'm working on setting up a NAS based Load Balanced Environment and I'm wondering if I need to setup a "TEMP" virtual directory, see *Reference, to handle the ClientDependency and ExamineIndexes files IN ADDITION to setting <add key="umbracoContentXMLUseLocalTemp" value="true" />.

I understand that umbracoContentXMLUseLocalTemp = true tells the logic to place/use the umbraco.config file in the ASP.Net temp folder local to the individual server.  I've been running into performance issues if I only have umbracoContentXMLUseLocalTemp = true in place.  The issues appear to go away when I have the virtual directory in place (pages load twice as fast).  I'm starting to lean towards not using umbracoContentXMLUseLocalTemp = true and to store all of it in the virtual directory using <add key="umbracoContentXML" value="~/App_Data/TEMP/umbraco.config" />.  I would prefer to not have to use a virtual directory.

I started setting up my load balanced environment using: http://our.umbraco.org/wiki/install-and-setup/installing-umbraco-for-load-balanced-environments which now contains a link that redirects you to http://our.umbraco.org/documentation/Installation/load-balancing. This document seems to indicate that I can optionally use a virtual directory if I'm using File Storage with File Replication.  It seems to indicate that umbracoContentXMLUseLocalTemp = true is all that you need to use for File Storage witha NAS.

I believe that http://our.umbraco.org/wiki/install-and-setup/installing-umbraco-for-load-balanced-environments used to contain the same content as this: http://our.sandbox.umbraco.org/wiki/install-and-setup/installing-umbraco-for-load-balanced-environments. This document seems to indicate that you need to have a virtual directory in place but it does not even reference umbracoContentXMLUseLocalTemp.

-----------------------------

*Reference

In addition to enabling the distributed calls above, there are some additional items that should be modified as well.  Each server will need a unique copy of the /App_Data/TEMP directory for Examine and Client Dependency Cache to work correctly.  Further, the umbraco.config xml cache file should also be unique to limit any issues with file locks.

Configuring Temp files with a virtual directory

  1. Edit /web.config and change the umbracoContentXML to use ~/App_Data/TEMP/umbraco.config.
  2. Copy the /App_Data/TEMP directory to each server, outside of any replication areas or to a unique folder for each server.
  3. Create a virtual directory (not a virtual application) in the /App_Data folder, and name it TEMP.  Point the virtual directory to the folder you created in step 2.
  4. You may delete the /App_Data/TEMP folder from the file system (not IIS as this may delete the virtual directory) if you wish.
Was it helpful?

Solution 2

I ended up using DFS Replication instead of a NAS solution.

OTHER TIPS

The whole point of using NAS is so that you don't necessarily need virtual directories. There is one shared file repository for all instances of the CMS. Because everything is stored in one place you don't need file replication either but you do have to ensure that the backoffice has sole access to it.

The exception is umbraco.config. This file needs to be present per instance and so you have to set umbracoContentXMLUseLocalTemp = true. This allows the umbraco.config file to be created in the HttpRuntime.CodegenDir directory (the directory where ASP.NET stores temporary files).

If you are noticing a substantial difference in performance between this and using a virtual directory instead, it is possibly because you don't have write permissions to the HttpRuntime.CodegenDir directory (so what is happening is that the site is hitting the database for its content each time).

Check these permissions first, as this option should be as quick as using a virtual directory, and less maintenance.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top