hi @Design_Gurus,
regarding this paragraph:
" How can the server keep track of all the opened connections to efficiently redirect messages to the users? The server can maintain a hash table, where “key” would be the UserID and “value” would be the connection object. So whenever the server receives a message for a user, it looks up that user in the hash table to find the connection object and sends the message on the open request."
I understand the purpose of the hash table here, the part is that not clear to me is
- each chat server has a local version (only users connected to this server) of this hash table? if yes, how does it ‘discover’ users that are connected to other servers?
- if this hash table is a global table (all users), each chat server has the same copy of this table? how big it can get for 500M DAU?
Thanks,
Milo