You can centralize your code in one common folder (either create a script that copies all the code to the 8 servers or use NFS).

This centralized code can be in one or more repository in your SVN. So when you push, you only push what you need to push.

For example, you can create 1 repository for your own PHP libraries (database class, xml , imap etc...). In a simple structure and when you call these files you simply do:

require('/web/lib/DatabaseMySQL.class.php');

This way, you know all your required files at in the same place and very easy to maintain. Specially if your code requires required files that requires files.

You can create as many repository as you want and repeat this if you don't want to mix up files - for example third-party (Smarty, phpmailer) with the code you create.

The other thing is, don't reinvent the wheel. There's plenty of good code out there that probably do what you already need to do. Like sending email (phpmailer or any others) or template system (Smarty or any others). This way you same development time and when an update if available, you simply download, copy (commit if you have it in a repository) and push.

Script VS NFS.

Create a script to push all your code in 8 web servers is easy to make. The down side of this is you need to make sure all the folders and all the files you have on each servers are identical in order to avoid errors. Also, if there's a lag on your network or the connection drop during the push some server won't have the same code. Again, more errors. This is a little faster to run versus the NFS solution.

Create an NFS fix the problem above since you only use 1 location but if that location drop all of your servers won't run correctly. So, when you push the code, you push only to 1 place and all the other servers automatically have the new code. Something you need to know also, this will be a little slower than if the code is directly on the hard drive.

Here's a sample script you can use:

You can create a .sh script that will copy the code from your repository (for example, code you checked out from the repository) to all server like this:

// file: pushcode.sh #!/bin/bash /usr/bin/rsync -avz --exclude='.svn' -e ssh /path/to/code/checkedout/ user@server1:/path/to/code /usr/bin/rsync -avz --exclude='.svn' -e ssh /path/to/code/checkedout/ user@server2:/path/to/code

make this script executable and run it:

./pushcode.sh

To make sure the code copy correctly without prompting the password each time, you will have to bypass the ssh login.

Here's a good one you might like: https://serverfault.com/questions/195035/linux-nfs-performance-vs-other-fss