Amazon ec2 所有从属实例之间的ec2实例同步代码问题

Amazon ec2 所有从属实例之间的ec2实例同步代码问题,amazon-ec2,ec2-ami,Amazon Ec2,Ec2 Ami,我是ec2的新手。我有一个主实例和多个从实例。我在主实例上推送代码,然后在所有从服务器之间执行rsync 怀疑- 1- Does rsync can create any issue. 2- because first PHP code interpreted then executed..When and where it will happen..and because customer is using it ..can it create any issue to custom

我是ec2的新手。我有一个主实例和多个从实例。我在主实例上推送代码,然后在所有从服务器之间执行rsync

怀疑-

1- Does rsync can create any issue. 
2- because first PHP code interpreted then executed..When and where it 
   will happen..and because customer is using it ..can it create any issue to customer
   i mean data loss or anything. 
3- can i do rsync code at any time

如果您有任何文档或链接,请与我分享。

您可能能够使用这种基于rsync的选项而不会出现任何问题。然而,在你的情况下,我会考虑一种广义的方法:

始终将代码置于版本控制中。设置新服务器时,使用某种配置管理(如Puppet、Chef、Ansible、Salt)。使用这些工具,您可以轻松设置相同机器的集群。在所有机器上使用来自VCS的相同签出

现在,当您想要部署代码时,您可以创建一个“剧本”或“配方”来完成所有必要的工作:登录到您的所有机器,从VCS中检查最新的代码,呈现静态资产,重新启动服务器等。此设置允许您使用一个使用rsync的更健壮和可扩展的解决方案