Nodejs Socketio AWS
With redis it will broadcast room messages and keep client state across the cluster, but your load balancer should ensure that in case of xhr-polling the client is always polling the same server.
Load Balancer working on TCP mode would just forward the contnet.
Trusted Proxies
Many frameworks can handle this for you. For example Symfony and frameworks using Symfony's HTTP components have a means to incorporate X-Forwarded-* headers.
They ask you to configure a "trusted proxy". If the request comes from a proxy who's IP address is trusted, then the framework will seek out and use the X-Forwarded-* headers in place of the usual mechanisms for gathering that information.
This provides a very nice abstraction over this HTTP mechanism, allowing you to forget about this issue and keep on coding!
Example of clustered sockets: https://github.com/rauchg/weplay/blob/master/index.js
Ref: Load-balancing Websockets on EC2
Support for Proxy Protocol, added last year to ELB, allows the backend server to identify the client’s connection information when using ELB’s TCP load balancing.
The support for Proxy Protocol v2 in accept-proxy was added recently in the version 1.5.0 of HAProxy
Limitations
single sessions distributed across many source IP addresses. Anyone surfing with a 3G phone, for example, or anyone behind a firewall with multiple outgoing IP addresses.
HAProxy for more than 64k websockets You can check a detailed explanation here
NOTE: Comparison of ELB and HAProxy.
Websockets with socket.io on AWS Elastic Beanstalk http://stackoverflow.com/questions/15907302/websockets-with-socket-io-on-aws-elastic-beanstalk
http://readystate4.com/2012/11/22/amazon-elastic-load-balancer-vs-haproxy/