<p>Add listeners to the ALB</p>

<p>1 listener for 3701
1 listener for 3702</p>

<p>update the ALB action for each Listener to point to the the correct Target Group </p>

CC BY-SA 4.0
2019-08-25T06:54:05.493Z
2019-08-25T06:54:05.493Z
VinDev
<p>I want my HTTP traffic on port 3701 and my WS (websocket) traffic on 3702. For a moment I thought that using 2 target groups was the answer, but there doesn't seem to be a way to differentiate between WS and HTTPS traffic using an ALB.</p>

<p>So perhaps using a NLB (network lb) will allow me to differentiate between the two? How can I have one load balancer forward traffic to 2 different ports?</p>

<amazon-web-services>
How to create ALB that can handle traffic on 2 ports
MrCholo
# How to create ALB that can handle traffic on 2 ports

(Asked by: username_0 on 2019-08-23)

I want my HTTP traffic on port 3701 and my WS (websocket) traffic on 3702. For a moment I thought that using 2 target groups was the answer, but there doesn't seem to be a way to differentiate between WS and HTTPS traffic using an ALB.

So perhaps using a NLB (network lb) will allow me to differentiate between the two? How can I have one load balancer forward traffic to 2 different ports?

**Tags:** amazon-web-services


---

## 1 answers

### Answer by username_1 on 2019-08-25. Score: 4 | Accepted answer

Add listeners to the ALB

1 listener for 3701
1 listener for 3702

update the ALB action for each Listener to point to the the correct Target Group


---

