“THE FASTEST AND MOST RELIABLE REAL-TIME ENGINE“
“It enables real-time bidirectional event-based communication“
io.on('connection', function(socket){
// emit an event to the socket
socket.emit('request', /* */);
// emit an event to all connected sockets
io.emit('broadcast', /* */);
// listen to the event
socket.on('reply', function(){ /* */ });
});
sticky sessions
ip_hash
Client <-- Worker 1 emit --> Redis
Client <-- Worker 2 <----------|
Client <-- Worker 3 <----------|
Client <-- Worker 4 <----------|
https://github.com/socketio/engine.io
https://github.com/socketio/socket.io
https://socket.io/docs/
https://www.pubnub.com/blog/2014-12-01-http-long-polling/
https://codeburst.io/why-you-don-t-need-socket-io-6848f1c871cd/
http://websocket.org/aboutwebsocket.html