Deployment on Amazon cloud with load balancer

What Is Elastic Load Balancing?

Elastic Load Balancing automatically distributes incoming traffic across multiple EC2 instances. we can create a load balancer and register instances with the load balancer in one or more Availability Zones. The load balancer serves as a single point of contact for clients. This enables you to increase the availability of your application. we can add and remove EC2 instances from your load balancer as our needs change, without disrupting the overall flow of information. If an EC2 instance fails, Elastic Load Balancing automatically reroutes the traffic to the remaining running EC2 instances(Ref-From AWS).







Please do the following setups to create  load balancer and then  add at least two EC2 instances .











Commands(connect to one of the ec2 instances):

  • ssh -i /path/my-key-pair.pem
  • /path/my-key-pair.pem - is where key is located
  • ec2-user - user name
  • Hostname
Then go into htdocs or your root directory and do the deployment .
after finish that do r-sync to other EC2 instance .
ex: rsync -i /path/my-key-pair2.pem -avz –exclude app/config/database.php –exclude app/routes.php –exclude app/storage /mnt/www/mybitbucket_bkp/

then please change the configuration to the newly updated server


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s