Azhar uddin's profile

Amazon Web Services - Mindmajix

Creating an Elastic Load Balancer in AWS
Create an Elastic Load Balancer (ELB)
Elastic Load Balancing automatically distributes and balances the incoming application traffic among all the instances you are running, thus improving the availability and scalability of your application. It seamlessly provides load balancing capacity. You create a load balancer and register instances with it which serves as a single point of contact for clients. Addition and deletion of EC2 instances from the load balancer can be done without disturbing the flow of information.

If the call completes successfully, a new load balancer is created with a unique Domain Name Service (DNS) name. The load balancer receives incoming traffic and routes it to the registered instances. You can create up to 20 load balancers per region per account. You can request an increase for the number of load balancers for your account.

To gain in-depth knowledge and be on par with practical experience, then explore AWS Training.

The service also makes it easy to add new instances or remove under-used instances when you need to increase or decrease the capacity of your application. The following diagram shows how the load balancer works. In this diagram, the load balancer contains two listeners. By default, the load balancer is configured to listen HTTP traffic on port 80. The first listener accepts traffic on port 80 using HTTP and forwards these requests to the Amazon EC2 instances using HTTP on port 8080. The other listener accepts traffic on the port 443 using HTTPS and forwards these requests to the Amazon EC2 instances using HTTPS on port 4443.

You can specify the protocol and port for both the client and the Amazon EC2 instances. In this step, we will create a load balancer for an HTTP service. We’ll specify that the load balancer listen on port 80 for incoming traffic from clients and then distribute traffic on port 80 to the instances.

As soon as your load balancer becomes available, you’re billed for each hour or partial hour that you keep the load balancer running. For more information about Elastic Load Balancing pricing, see the Elastic Load Balancing details page. For more information about elastic load balancers, go to the Elastic Load Balancing Documentation.

Creating a load balancer
You can create an internal load balancer to distribute traffic to your EC2 instances in private subnets.

Load Balancer has two components: the load balancer and the controller service. The load balancer monitors traffic, whereas the controller service monitors load balancers.
If a call is finished, a new load balancer is created with a unique Domain Name Service (DNS). Almost 20 load balancer can be created per account which is also extendable.

1. Define a load balancer:
Open the Amazon EC2 console at https:// console.aws.amazon.com/ ec2/.
In the Navigation pane, in the Region list, click US East (Virginia).
In the Navigation pane, click Load balancers.
In the Create a new load balancer wizard, in the load balancers pane, click create load balancers.

On the define load balancer page, enter a name for your load balancer. In this example, type MyLB.

Leave the Listener Configuration set to the default value for this example. The Load Balancer Port and Protocol specify the port and protocol that the load balancer will use to listen for traffic from the clients. The Instance Protocol and Port specify the port and protocol the load balancer will use to route traffic to the instances. For example, if you want the load balancer to forward traffic to the instances using port 8080, you can specify that here.

Note: After you configure the listener information, you cannot change it. If you want to update this information, you will need to create a new load balancer.
Click Continue.

2. Configure the health check:
Elastic Load Balancing routinely checks the health of each load-balanced Amazon EC2 instance. This health check determines the instances of health status. If Elastic Load Balancing finds an unhealthy instance, it stops sending traffic to the instance and reroutes traffic to healthy instances.

a) On the Configure Health Check page of the Create a New Load Balancer wizard, do the following:

On the Configure Health Check page, under Configuration Options, do the following:
Leave Ping Protocol set to its default value of HTTP. In the future, if you want to use a more secure protocol for the load balancer to send ping requests to your instances, you can use HTTPS and specify a different port. For more information regarding HTTPS with Elastic Load Balancing, see Elastic Load Balancing Security Features in Elastic Load Balancing Developer Guide.

Leave Ping, Port set to its default value of 80. Elastic Load Balancing uses the ping port to send health check queries to your Amazon EC2 instances.

Note: If you specify a ping port value, your Amazon EC2 instances must accept incoming traffic on the port that you specify. You can set a port value other than 80, and you can change this value at any time.

In the Ping Path box, replace the default value with a single forward slash (“/”).
Elastic Load Balancing sends health check queries to the ping path you specify. This example uses a single forward slash so that Elastic Load Balancing sends the query to your HTTP server’s default home page, whether that default page is named index.html, default.html, or any other different name. When you deploy your application, consider creating a special light-weight file that responds only to the health check. Doing so helps differentiate between traffic that is hitting your site and responses to the load balancer.

b) On the Configure Health Check page, under Advanced Options, set the Healthy Threshold to 2. Accept the default values on the other options.
Typically, the default value of 10 is fine for a healthy threshold. To expedite this tutorial, we specify 2, so you don’t have to wait as long to see healthy instances.

c) Click Continue.
Amazon Web Services - Mindmajix
Published:

Amazon Web Services - Mindmajix

Published:

Creative Fields