11

I have the following scheme:

Internet <-> elb1external <-> varnish <-> elb2internal <-> targetgroupofwebnodes

But some /static/* & /media/* are routed to targetgroupofwebnodes from elb1external directly, around varnish & second ELB, so I need both elb1 & elb2 to point to the same target group of web nodes.

The Amazon web console shows the group as grayed out, when I try to select it from the drop down on the second ELB, but I do see mentioning of that scheme being possible on the web.

As a workaround I've created targetgroupofwebnodes2 with the same servers in it, but I'm required to have only 1 & the next task is autoscaling, so there's going to be an autoscaling group instead of target group.

Must I use the CLI for that or there's a way through the web console?

2
  • You can targeting 2 ALB (or more) to 1 target group, but you can't chain two ELB/ALB (like in your description) in any case. Maybe explain more about your requirement other than the solution so others able to help you with a possible way to solve it – number5 Jul 27 '17 at 0:10
  • It looks like you can't point 2 ALBs to 1 target group (that's actually what I need) according to Amazon doc: docs.aws.amazon.com/elasticloadbalancing/latest/application/… Load balancers per target group: 1 – GTXBxaKgCANmT9D9 Jul 27 '17 at 17:25
14

I'm not sure if you can point two ALBs to a single TargetGroup. However since you mentioned AutoScaling you can have the ASG instances automatically registered in more than one TargetGroups, therefore your approach with two target groups will work just as well with AutoScaling.

Hope that helps.

UPDATE #1

The OP was able to find this link to AWS docs on limits titled: Limits for Your Application Load Balancers. In this docs on limits the number of target groups per ALB is mentioned in this table:

Target Group Limits

  • Load balancers per target group: 1
  • Targets per target group (instances or IP addresses): 1000
  • Targets per target group (Lambda functions): 1

Based on this info, you cannot have the same target group in more than one ALB.

2
  • 1
    Thanks for your answer! I've actually figured it out myself while playing with auto scaling groups. Two ALBs can't be pointed to a single Target Group & it's strange: docs.aws.amazon.com/elasticloadbalancing/latest/application/… Load balancers per target group: 1 – GTXBxaKgCANmT9D9 Jul 27 '17 at 17:27
  • 1
    @GTXBxaKgCANmT9D9 if the answer is correct please upvote and accept it to reward the reputation points for the effort taken answering your question. Thanks! – MLu Oct 7 '18 at 6:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.