16

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?

slm
  • 7,355
  • 16
  • 54
  • 72
GTXBxaKgCANmT9D9
  • 395
  • 1
  • 6
  • 15
  • 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 00:10
  • It looks like you can't point 2 ALBs to 1 target group (that's actually what I need) according to Amazon doc: http://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-limits.html **Load balancers per target group: 1** – GTXBxaKgCANmT9D9 Jul 27 '17 at 17:25

1 Answers1

21

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.

slm
  • 7,355
  • 16
  • 54
  • 72
MLu
  • 23,798
  • 5
  • 54
  • 81
  • 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: http://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-limits.html **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 07 '18 at 06:16
  • The linked AWS docs do not contain the "Load balancers per target group" limit anymore. Does this mean it is now possible? – Florian von Stosch May 17 '22 at 07:39