简体   繁体   English

为AWS中的弹性负载均衡器(ELB)同步两个ec2实例

[英]Synch two ec2 instance for elastic load balancer(ELB) in AWS

I want to use elastic load balancing in aws, I know that how to configure the load balancing from aws console. 我想在AWS中使用弹性负载平衡,我知道如何从AWS控制台配置负载平衡。

I read many blogs and tutorials to configure the load balancing but I still have question regarding the EC2 instances that going to use for load balancing. 我阅读了许多博客和教程来配置负载平衡,但是对于要用于负载平衡的EC2实例,我仍然有疑问。

  1. How the files will get synch b/w all the instances, So that whenever traffic get move to different instance it get updated files and database records. 文件如何在所有实例之间保持同步,以便每当流量移动到其他实例时,它将获取更新的文件和数据库记录。

  2. Is there any tool in the AWS console that can do it? AWS控制台中是否有任何工具可以做到这一点?

  3. Can we achieve it using EBS, I means can we use one EBS volume for different instances? 我们可以使用EBS来实现它吗,我是说我们可以针对不同的实例使用一个EBS卷吗?

I'll be thankful if you can suggest me the best way to implement it. 如果您能建议我实现它的最佳方法,我将不胜感激。

Thank You 谢谢

  1. Your EC2 instances need to be exact copies of each other, meaning they need to run exactly the same software stack. 您的EC2实例需要彼此完全相同,这意味着它们需要运行完全相同的软件堆栈。 As far as the database is concerned you need have a single backend database (unless you are sharding your data) If you want more reliability and faster read performance you want to setup database replication. 就数据库而言,您需要一个后端数据库(除非您要分片数据)。如果要获得更高的可靠性和更快的读取性能,则需要设置数据库复制。 (You can accomplish this with RDS) (您可以使用RDS完成此操作)

  2. Use RDS for database backend. 将RDS用于数据库后端。

  3. More than EBS I think to have your instances exactly the same you want to use AMIs. 除了EBS,我认为您的实例与使用AMI的实例完全相同。 AMIs are Amazon instance images that are based off an EBS Snapshot. AMI是基于EBS快照的Amazon实例映像。

Hope this helps. 希望这可以帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM