Home › Forums › AWS › AWS Certified Solutions Architect Professional › Use ALB or NLB for Websocket? › Reply To: Use ALB or NLB for Websocket?
-
Good day leon cao,
Thank you for raising this concern. You are correct that Application Load Balancers (ALBs) support WebSockets.
However, ALBs are designed for HTTP and HTTPS traffic only and support WebSockets when they are running over those protocols, typically on ports 80 and 443. In the given scenario, the Virtual Learning Environment (VLE) requires WebSockets on port 5000 and additional interactive features on port 8080. Since these are non-standard TCP ports, an ALB cannot be used to handle this traffic.
Accordingly, Network Load Balancers (NLBs) operate at Layer 4 and can forward traffic on any TCP or UDP port, making them suitable for workloads that use custom ports such as 5000 and 8080. This is why the recommended solution uses an NLB in each Region to handle both the WebSocket and whiteboard traffic, combined with Route 53 latency-based routing for global user redirection and DynamoDB global tables for multi-Region data consistency.
If you have further questions or need additional clarification, please don’t hesitate to contact us.
Best,
Irene @ Tutorials Dojo