The first repo which can chat through mutliple server and can have private , group , confrence chat by this . what you need to do to start.
Install redis which take 6379.
What you need to do clone my repo in various folder of your system and the change the port of node.js server , so that all node server should have different port .
Now run node.js
create a room , that room will give you a code , and then addroom of that room code in the other server , you can add this room code to all the server you want to communicate with each other .
if you have different AWS server then what you need is redis server should be same for both server .
By this repo is can create chatting as facebook does . create unique room for each private chat or group chat , that message will go only to those user. feel free to ask if any query.