title: Keep Uploaded Files in Sync Across Multiple Servers - PHP Linux
body: <p>I have a website right now that is currently utilizing 2 servers, a application server and a database server, however the load on the application server is increasing so we are going to add a second application server.</p>
  
  <p>The problem I have is that the website has users upload files to the server. How do I get the uploaded files on both of the servers?</p>
  
  <p>I do not want to store images directly in a database as our application is database intensive already.</p>
  
  <p>Is there a way to sync the servers across each other or is there something else I can do?</p>
  
  <p>Any help would be appreciated.</p>
  
  <p>Thanks</p>
  
  <p>EDIT: I am adding the following links for people that helped me understand this question more:</p>
  
  <p><a href="https://serverfault.com/questions/312306/synchronize-files-on-multiple-servers-rsync">Synchronize Files on Multiple Servers</a>
  and
  <a href="https://serverfault.com/questions/405873/keep-uploaded-files-in-sync-across-multiple-servers-lamp/405876#405876">Keep Uploaded Files in Sync Across Multiple Servers - LAMP</a></p>
  
  <p><strong>For all Reading this post NFS seems to be the better of the 2.</strong></p>
  
  <p><strong>NFS will keep files in sync but you could also use <a href="http://codestips.com/php-ftp-upload-tutorial/" rel="nofollow noreferrer">ftp to upload</a> the files across all servers as well but NFS looks like the way to go.</strong></p>