Developing real-time applications on AWS ELB without WebSocket

User Interface Oct 17, 2017 Grid Dynamics

by Yaroslav Basovskyy

Yaroslav Basovskyy

Recently, we started working on a mini chat application for a client support team. Though we expected a quick and easy implementation, we hit on some unexpected issues. We built the UI for our real-time application, wrote unit tests, and prepared some routes and controllers on the back end. Everything went fine up until we ran our first test – and that’s when our progress came to a halt. Our handshake request returned “Error during WebSocket handshake: Unexpected response code: 400.” It turns out that our client was running AWS Elastic Load Balancer (ELB) using Classical Load Balancing (CLB), and CLB doesn’t support WebSocket on the HTTP/S protocol, forcing us to find an alternative that would be compatible with our client’s existing platform.

Read More