Welcome Guest, Not a member yet? Register   Sign In
accessing static files on another server
#1

[eluser]dmorin[/eluser]
Sorry in advance if this isn't CI related enough to be posted here.

For my site, I have 2 servers; 1 for static content (css, js, img, etc) and one for the dynamic content. This way, I can offload the static content to a lesser system which can still process the requests very quickly.

However, my site also allows users to upload profile pictures. When a user uploads a pic, we make a few copies of it at different sizes and write it out to the file system. Currently, there are hosted on the dynamic box when ideally they should be on the static box. Which leads me to the question:

Does anyone know of the best way to have CI read/write from another server's file system? Would you use rsync, sshfs, or something else? If I needed to add more static servers to handle additional load, how would you do it then?

I'm even thinking something like Amazon S3 might be a better solution, but given their outage, I would still need to have a local version of the static content to use as a backup.




Theme © iAndrew 2016 - Forum software by © MyBB