2 questions about Application Load Balancers

0

Question 1 I stood up an application load balancer that has a target group of 2 entries. <ec2 IP>:8080/index.jsp and <ec2 IP>8081/index.jsp both IPs point to the same host and both are healthy (just listening on different ports) I have the traffic split between the target group as close as I can to 50% 50%. The application load balancer is working and serves the app home page.

When I take down the 1 of the tomcat instances, I get a GATEWAY timeout error. The LB method is round robin. I am used to fronting tomcat with an Apache HTTPD server using SimpleTcp cluster. Does the Application load balancer adapt to 1 of the target group entries being down? Or do I need a Network load balancer?

Question 2

I have mapped my dns to use the App load balancer public IP for dev.<mydomain.com> with an A record on GoDaddy. I can telnet to dev.<mydomain.com> port 80 and I get connected. What do I need to do to get my domain to serve from the load balancer? I am guessing it has something to do with HTTP Headers?

Please advise and thank you for your help on this Charlie D

asked 7 months ago185 views
1 Answer
0

Hi.

Does the Application load balancer adapt to 1 of the target group entries being down?

Yes. If you set weight to a target group, a portion of traffic will be sent to the target group regardless of its health state.

Or do I need a Network load balancer?

As shown in the page below, network load balancer can only have one target group for each listener, so you can't split traffic between two versions of your app.

https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_ForwardActionConfig.html

What do I need to do to get my domain to serve from the load balancer? I am guessing it has something to do with HTTP Headers?

Instead of A record, you can use CNAME record. If you want app.example.com to point to your ALB, create a CNAME record with name app.example.com and set its value to your ALB's DNS name (e.g., my-alb.us-west-2.elb.amazonaws.com).

profile picture
HS
answered 7 months ago
  • I haven't been able to NOT set a weight to the target group in UI. I have two target groups "target 1" listening on 8080 and "target 2" listening on 8081. When I select target 1 in my rule, it sets the weight to 1. then i select target 2 and it sets the weight to 0. Not sure what I am doing wrong

    as far as serving via my DNS name, When I am RDPd into the EC2 host I can use ww2.<mydomain.com> and it works. I does not work outside of the EC2 instance. Not sure what to check for. thanks for your help

    Charlie D

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions