Can AWS ALB forward the traffic to another ALB
Asked Answered
G

2

8

We have two Nginx running and first Nginx receives the traffic after checking some rules forwarding the traffic to another Nginx, now we are moving this to AWS ALB, but not found any option for forwarding traffic from one ALB to another ALB.

Please help me on how to do this.

I know these two ALB is a Design problem but at this point in time we can not change this, the team will do this in the future.

Garlan answered 25/9, 2020 at 4:19 Comment(7)
You mean Public ALB-> private ALB, private ALB -> private ALB, or some other combination?Fultz
Hi, public ALB -> private ALB is my case.Garlan
Sadly you cant do this. You can't directly connect ALB to ALB, as ALBs don't have static IPs addresses.Fultz
Yes, I am looking for any workaround.Garlan
The easiest would be to replace internal ALB with internal NLB. NLBs have static IPs.Fultz
@DeepeshUniyal Were you able to find a workaround/solution for this scenario?Overbite
The problem with an NLB is that it doesn't speak layer 7 protocols and therefore can't do things like HTTP health checks, which an ALB can doWelcy
M
3

Unfortunately you forward traffic only from NLB to ALB. As far as I know AWS does not support forwarding from ALB to ALB. You can sort of cheat on it by create a fixed IP target group, but this is not very stable because ELBs IP addresses can change any time without notice

Mordacious answered 2/7, 2022 at 14:57 Comment(0)
C
1

I wish that could be done as there are valid use cases for chaining ALBs. As a work around I've seen what @Vlad suggested combined with a lambda that runs once a minute, reading the IPs of the second ALB and then setting the target group of the first ALB with the IPs of the second ALB. Still a hack though in my mind but it's all that we've got...

Clubfoot answered 13/10, 2022 at 16:10 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.