I'm moving from single app server to load balanced config.
In the single server config I synchronized the sources by S3 cmd sync s3 every few minutes and on hostup (Scalr event) I sync the sources back from S3. This ensures the server will run updated sources.
What is the best practice when the number of app servers is dynamic?
Suppose I have 2 servers and server A gets an updated sources. If the sync script runs on B first, server A will get the old file from B instead of the other way around.
What is the best practice in this case?