Hello,
We currently have a website that is load balanced across 2 servers with one side of the load balancer also serving an admin site.
We believe we have set everything up correctly with regards to publishing pages and we can confirm that changes are pushed out to the non admin sites.
The problem we face is that media is uploaded through the admin site which means that the file physically exists only on one of the folder structures. The 2 non-admin sites however do not have that physical file in their folder structure which means they will not serve media.
Is there something I'm missing here? Do I have to do something to get the file into the other sites or is there a setting to get the media from a specific site?
Ideally we would like the media uploaded to all of the websites so that requests are load balanced properly.
Thanks for the reply. I think we are going to go down the route of a file replication service running on the server that will copy files over every 2 minutes.
I also found that if you edit the FileSystemProvider.config file to this then it will force Umbraco to get the media from the Admin site:
<Provider alias="media" type="Umbraco.Core.IO.PhysicalFileSystem, Umbraco.Core">
<Parameters>
<!-- Umbraco Default Path -->
<!--Add this key to the ADMIN site only -->
<add key="virtualRoot" value="~/media/" />
<!-- ADD THESE KEYS TO THE LOAD BALANCED SITES ONLY -->
<!-- ***** IT IS IMPERATIVE THAT YOU PROVIDE THE FULL PATH TO THE MEDIA FOLDER ***** -->
<!--<add key="rootPath" value="\\MYSERVER\FULL-PATH-TO-THE-MEDIA-FOLDER"/>
<add key="rootUrl" value="http://myadminumbracosite.co.uk/media" />-->
</Parameters>
Then the next thing you need to do is kill the media cache every 5 seconds on your non-admin sites.
Sharing media across load balancers
Hello, We currently have a website that is load balanced across 2 servers with one side of the load balancer also serving an admin site. We believe we have set everything up correctly with regards to publishing pages and we can confirm that changes are pushed out to the non admin sites. The problem we face is that media is uploaded through the admin site which means that the file physically exists only on one of the folder structures. The 2 non-admin sites however do not have that physical file in their folder structure which means they will not serve media. Is there something I'm missing here? Do I have to do something to get the file into the other sites or is there a setting to get the media from a specific site?
Ideally we would like the media uploaded to all of the websites so that requests are load balanced properly.
Thanks,
Hi,
This is normal. The file are uploaded to the admin server and not on the front end servers.
There are several optoins you can do.
Some more information can be found here : https://our.umbraco.org/documentation/Getting-Started/Setup/Server-Setup/load-balancing/flexible
Dave
Thanks for the reply. I think we are going to go down the route of a file replication service running on the server that will copy files over every 2 minutes. I also found that if you edit the FileSystemProvider.config file to this then it will force Umbraco to get the media from the Admin site:
Then the next thing you need to do is kill the media cache every 5 seconds on your non-admin sites.
is working on a reply...