So, I have been playing around with Amazon Cloud (AWS) and I am trying to figure out how to get files on to all server's if they are load balanced.
At first I thought I could tie 3 different instances to a load-balancer and then have each instance utilize the same volume. That way all I would have to do is update the one volume with the recent build of the site and each instance would then access that. However, I have read that you can't share volumes across instances.
So what is the solution? Would I have to have the three instances all with the same data, and a forth that I could update? Then the forth would replicate the data across the other three.
Just trying to figure out how to update update the production files, and have all servers that are handling the load to pull in the most recent code base.
Network Load Balancer currently supports 200 targets per Availability Zone. For example, if you are in two AZs, you can have up to 400 targets registered with Network Load Balancer. If cross-zone load balancing is on, then the maximum targets reduce from 200 per AZ to 200 per load balancer.
Elastic Load Balancing automatically distributes your incoming traffic across multiple targets, such as EC2 instances, containers, and IP addresses, in one or more Availability Zones.
If an instance fails the health check a given number of times, the load balancer will stop sending traffic to the instance. The load balancer will continue performing the health check and, if the instance again passes the health check a given number of times, the load balancer will again serve traffic to the instance.
Yes all servers need to have identical content. You could do this by creating an NFS share or similar, and mounting it at the same point on each server. But apparently a decent workaround is to create snapshots of an EBS volume and then mount them on each instance. See http://linuxforlovers.wordpress.com/2009/04/11/sharing-amazon-elastic-block-store-among-multiple-instances/ for more details. Every time you want to commit your changes, you commit to the EBS volume only.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With