Templates (e.g. XSLTs, Word documents, Crystal Report Files and other such files) are often used by third party software (Aspose, Crystal Reports, etc.) which are not capable of streaming files via the IFileObject interface. Thus, as a matter of practice, template files are maintained on the same file system where the code is executing (i.e. the web or application servers).
The DistributedFile class allows for uploading a file to multiple locations. In a load-balanced server farm, this allows uploading of template files to multiple servers.
Assume the following scenario for a production environment:
When writing templates to a web server, a copy of the template must be written to each of the 5 machines listed above. The configuration file for A1P1Mortgage should look something like this:
When reading a template, only one machine needs to be used. The DistributedFile will read from the first destination listed, and each machine should list itself first to speed loading time.
So the configuration for A1P2Mortgage would look slightly different: