简体   繁体   中英

aws and elb function with mysql database

I want to ask if I have 2 identical ec2 instances each with MySQL. If i add a load balancer on the front of the ec2 instances, the databases of ec2 will have the same data or every database will have the data that process by a request? In other words with elb the databases will be synchronized somehow or every database will have different information?

Many thanks!

I would recommend using Amazon's RDS . It is easier to setup and you do not need to manage the cluster. If you really want to manage the boxes yourself I would look at configuring Galera

Here is a tutorial from Digital Ocean, but it would work on AWS as well.

Hope I don't think two EC2 instances must have same data in MySQL DB. ELB will send request to any EC2 instances so data will update in one instance and not in another instance anyway MySQL DB are not synchronized between instances.

I recommend you to use Amazon RDS service which is relational database and it offers MySQL, MSSQL, PostgreSQL, Oracle and Amazon Aurora. You can use any database and enable high availability for good performance.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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