Lets see some issue what we are facing in real time.
Connection Time out:
When there is an app which is getting the data from the back end and it took time to give a response.
if the data is not receiving in time, automatically client app will get "connection time out" issue.
You can increase the Idle time out period under description tab of Load balancer.
Out of service:
When client app sends a multiple requests to the server when it is fetching the data continuously and some times the server is not having that much RAm or CPU to allocate data which is fetching , it will give an issue as "out of service".
Access logs has the below info.
- URLs and accessing details of the app that who is accessing your app.
- Client App
- time stamp
- client agent
Connection draining:
When we are removing EC2 from load balancer , the connections which are placed on these EC2 will drain out means it will remove and it won't accept new connections when draining mode.
Stickiness:
When we want to route traffic to only one EC2 instance based on the cookies stored in the browser, We can enable the stickiness feature and use the same.
Now you can refresh the browser , it will only point to the same EC2 .
Make a note that , when you want your EC2 should accept requests only from ELB not from the user, you can configure the ELB security group to that EC2 instance , so that your EC2 won't be access from the user but from ELB you can access.
Application Load balancer:
You can navigate requests from client based on path or port based .
Now lets see an ex with path based.
Create folder(orders) and index.html like below in Ordres(Ec2) instance.
Now access EC2 like below
Follow the same for Prime EC2 as well and create new page index.html in Prime folder and access as below
lets create Target groups for Prime and orders.
Select Next
Select "create target group" now you can see the target groups as below
Repeat the same for Prime EC2 and create the other target group.
Now create load balancer
Select "create security group"
Configure routing
So, you ALB is created , now you can take DNS name and check it in browser you will get Orders page if you add /orders/ to the DNA name.
Now go to listeners and add Prime to that rule as below
Then SAVE.
Below is for Orders EC2.
This is the process to create Application load balancer and works as expected based on path.
Thank you for reading👍👍👍👍👍👍
No comments:
Post a Comment