title: Loadbalancing web sockets - AWS Elastic Loadbalancer
body: <p>I have a question about how to load balance web sockets with AWS elastic load balancer.</p>
  
  <p>I have 2 EC2 instances behind AWS elastic load balancer.</p>
  
  <p>When any user login, the user session will be established with one of the server, say EC2 instance1. Now, all the requests from the same user will be routed to EC2 instance1.</p>
  
  <p>Now, I have a different stateless request coming from a different system. This request will have userId in it. This request might end up going to a EC2 instance2. We are supposed to send a notification to the user based on the userId in the request. </p>
  
  <p>Now,</p>
  
  <p>1) Assume, the user session is with the EC2 instance1, but the notification is originating from the EC2 instance2. 
   I am not sure how to notify the user browser in this case.</p>
  
  <p>2) Is there any limitation on the websocket connection like 64K and how to overcome with multiple servers, since user is coming thru Load balancer.</p>
  
  <p>Thanks</p>