Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

uploading assets and load balancer


Reply


6 Posts   2224 Views

Avatar
streetdaddy

32 Posts

10 August 2010 at 8:53am

i have 6 front-end webservers behind a cisco load balancer and when I upload assets via the CMS they only seem to end up on one server. Is this a known issue with SS or should I be investigating the problem at my end first?

This is when uploading via the sidebar in the CMS. Multi-file upload in Files and Images tab doesn't work at all (gets stuck at the end of the upload)

Silverstripe 2.4.1

nb. other than this my colleagues who are now managing the content are blown away with the quality and ease of use - as are pretty much all the people I've introduced to this magical CMS!

Avatar
Willr

Forum Moderator, 5513 Posts

10 August 2010 at 2:26pm


This is when uploading via the sidebar in the CMS. Multi-file upload in Files and Images tab doesn't work at all (gets stuck at the end of the upload)

With the assets upload not sure whats going on there. Do you get any errors uploading a single image? anything in your log file to give you a clue. I assume the permissions are fine? Not sure how good your load balancer is but maybe its sending the upload request in assets from a different webserver than the cms users on (and therefore the temp upload)? (I haven't done much with load balancers and assets before)

SS probably doesn't even know that load balancer exists, previously what I've done is have the assets folder as a share directory on one of the webservers so when uploading from the cms all the other webservers had the file as well. You could also hook up an onAfterWrite or similar to sync the file which is uploaded over all 6.

Avatar
streetdaddy

32 Posts

10 August 2010 at 11:10pm

Indeed SS is not aware of the load balancer so its only uploading the image to the web server the user is currently on. I'm investigating both the shared folder and onAfterWrite possibilities, I'll let you know what I find... Unfortunately the short answer seems to be that SS is not built to handle load balancing out of the box. In other projects we've used S3 to store assets like this, but I think it will quite a lot of work to replace all the SS media storage functionality with S3... Or it might be a fun project!

Avatar
Willr

Forum Moderator, 5513 Posts

12 August 2010 at 10:53pm

Having S3 support would be pretty kick ass. Marcus has done some work with External file connectors (http://doc.silverstripe.org/module:external-content-quickstart) not sure how easy it would be write an adapter for S3 for that (if there is not one already lurking..)

Avatar
streetdaddy

32 Posts

9 October 2010 at 5:58am

after getting sidetracked for months and getting back to trying to find a solution, I've discovered Uploadify - and now I'm curious if your 'lurking' comment above was a hint!

Avatar
zard

Community Member, 24 Posts

19 January 2011 at 12:41pm

I just have a supplementary question - so you have 6 front end servers connecting to a separate (single) database server?

I am currently in a process of planning a hosting for a very high traffic website and I am considering the options... How many hits does your site receive?

Thanks a lot for any answers.