with Application load balancer can do the following:
- Load balancing to multiple HTTP applications across machines (target groups)
- Load balancing to multiple applications on the same machine(ex: containers)
- Load balancer based on route in URL.
- Load balancer based on hostname in URL.
in comparison, we would need to create one Classic load balancer per application before. That was very expensive and inefficient.
Target group represent one application included with some EC2 instances along with health check. we will register the target group to Application load balancer.
in the below flowchart, we have 2 target group with representation of 2 application, registered to application load balancer with the protocol HTTP.
if the user searches for route/user, then the application load balancer redirected it to target group users. Similarly for search target group also,if the user search for route/search, our Application load balancer will re-direct it to search target group.
- Create a target group.
- Setup an application load balancer.
practical steps for Create a target group :
---------------------------------------------------------------------------------------------------------------------------
from load balancer page --> Navigate to load balancer --> target groups(as shown below).
1. enter target group name:
2.enterprotocol for EC2 instance connection from target group.
3.port no. for HTTP protocol is 4567.
4.VPC: i'm give default one.
Health check settings:
protocol as HTTP
Click on the Advanced health check settings dropdown. provide the override port (ex: port no.4568) if required.
provide time interval info.
finally click on create.
conformation screen for target group creation.
Then screen will prompts to target group page, Navigate to Targets tab --> Edit.
1.Ensure that the port number is 4567 based on protocol.
2.select the required EC2 instance that need to add target group.
3.click on Add to registered. 4.Finally click on SAVE option available at the right bottom of the page.
- practical steps for Setup an application load balancer:
Now navigate to load balancer page:
Choose application load balancer--> Click on Create.
Name : <load balancer name>
scheme: internet facing - public ip based load balancer( web)
by default load balancer HTTP protocol and load balancer port as 80 is available.
if any other protocol is required add them in the last step & Now click on Next.
Add security Groups to the load balancer.
Name : dropdown select the correct load balancer.
rest all information will be updated based on this 2 entries.
Conform the target groups and click on Next.
That's all similarly we can add multiple target groups to single Application load balancer.
-----------------------------------------------------------------------------------------------------------------------------
No comments:
Post a Comment