I'm setting up load balacing for the first time and have some questions about syncing codes, static files and database. My server is Ubuntu 12.4 and going to use rackspace cloud load balancing.
For code, I can probably use git to sync all files. Also read about using rsync to run automatically and sync code files in different servers.
Static files: I'm planning on using S3, so they are shared among servers. Another option is to use rsync to sync static files stored in servers.
My question is syncing database. If there are two separate servers running MySQL, how can I sync them? My guess is that I should have a remote SQL server so both servers can have access to them. Is this the only way or the recommended way to make database to work with different servers?