WebSocket subscription not working while using multiple Application Load Balancer

0

Hi,

We are Using Application Load Balancer for our website, We have configured it as below,

  1. Two Client instances ( client-A and client-B ) for Front-End
  2. Two Server instances ( server-A and server-B ) for Back-end

If we use 2 instances for the client & single instance for the server, then every WebSocket **Subscription is working fine **But if we switch it to 2 instances for clients & 2 instances for the server, then the **WebSocket subscriptions are not working **at all.

Kindly let us know, Is there any methods available to handle web-socket using Load Balancer on AWS, If yes, then kindly guide us to sort out this issue.

We also want to know, To which instance the WebSocket request is entering and from which instance the response is coming out. So kindly help us.

Thanks in Advance...

asked 2 years ago743 views
1 Answer
0

Hi.

Do you have two ALBs for the front end and ALB for the back end? What are the roles of front-end and back-end applications?

When a user accesses the backend ALB from a client, the first thing that comes to mind is a session. WebSocket is stateful. Try ALB's Sticky Session first.

https://docs.aws.amazon.com/elasticloadbalancing/latest/application/sticky-sessions.html

profile picture
EXPERT
iwasa
answered 2 years ago
  • hi, We have two front facing ALB and another two back-end server facing ALB this how its work all back end will be in private facing only ALB in public so this ALB will connect front end server and front end ALB will in the DNS pointed

    so i need sticky-sessions which not working for this issues

  • If you are using multiple ALBs, can you have a minimal architectural diagram?

  • yes We have architectural diagram but we can not revel here so if there any question which help you to understand the issues kindly let me know

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions