Вопрос

I have two questions:

  1. Can I use ELB on my RDS instance for load balancing?
  2. Can I install multiple servers on EC2 instance and run single ELB instance for all servers?
Это было полезно?

Решение

1-If you mean having only one RDS instance, there is no point in load balancing requests in front of it. If you mean having more than one RDS instance, it does not make much sense as well to load balance requests, because your database servers will most likely have different data in a given point of time. The only exception that I can see to this rule is if you have read-only RDS instances. In this case, you can probably benefit of having ELB(s) in front of them. If your application is write-intensive, you should stick with a larger RDS instance or move to a noSQL database. Don't try to load balance requests to a read/write DMBS, because you will have to deal with synchronization and a lot of other (non-trivial) aspects by yourself.

2-Yes, this is totally feasible. For web servers, of course. Not for DBMSs in general.

Другие советы

  1. In spite of all the reasons for attaching ELB to RDS, AWS does not provide feature to connect ELB to RDS currently. ELB work with EC2 instances only yet.

  2. Yes/No, you can install Different services on a EC2 instance but you can't install Same services that have different port on a EC2 instance. ELB load balance Same service to Same ports, but it can provide multiple services on an ELB. It also provide only one health check feature so if one service is dead that is point of health check, all the other services will be blocked by ELB at the same time.

For question 1, I can think of two options with this. One is to put the database into the EC2 instance by putting it into the AMI for that instance. You would need to have writes be written to all of the databases or have them share data that resides in EFS. The other option is to use Route 53 and a private hosted zone to provide load balancing between the RDS instances. Again, if they use EBS then all writes will need to be done to all of the databases unless the database resides in EFS.

Ultimately you will need to try different configurations and evaluate performance to know which one is best for your specific requirements.

With question 2, I don't understand what you are asking because I think of a one-to-one relationship between a server and EC2 instance. What is the difference between them so you call one thing a server and another thing an EC2 instance? ELB works over multiple availability zones within the same VPC and region.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top