-
Notifications
You must be signed in to change notification settings - Fork 171
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Server load issue #62
Comments
Could you pls test this method? Socket.io would use used long polling first for compatibility which some platforms couldn't support WebSocket. https://stackoverflow.com/questions/15872788/maximum-concurrent-socket-io-connections |
I already tried it but it doesn't work. Is it related with data amount which is transferred by socket? |
@sarawut11 when happening this issue, could server-side receive the socket emit from client-side? Such as socket.on('sendPrivateMsg', async (data, cbFn) => {
// here could server-side receive the socket emit from client-side at that time?
......
} Check the server status find is it too busy to handle incoming socket events at that time. If it is, could use some method to do server optimization, such as load balancing, cache technology to prevent operating database immediately, and so on. I am so sorry I have no experience on server optimization. |
Hi @sarawut11 , are there any updates? |
@aermin I splitted the server into two servers - one for main node server, another one for socket only server. |
Thanks let me know. I hope this project could really help you. Welcome to discuss with me about some performance optimization at least on the code level if you need. |
I could resolve the issue @aermin by refactoring the code architecture. |
@sarawut11 you are very cool ! ! I create a telegram group and will invite other people who have server-side optimization experience, who got this issue, or who are interesting in it.
Look forward to taking some discussion with you. |
I'm not sure if this is actually related with server load but please check this one.
I'm a fan of this project so forked and customized it.
Now before move to production, we are testing in local. It works really great when have less than 300 users.
But after that, auto-logout issue is happening, chat freezing issue is happening.
And also even though some users sending message but it isn't shown on the other user's side.
Is this related with socket.io concurrent issue? I applied all approaches introduced in google to fix this issue.
But it only increased from 300 to 350 users.
I have nginx server behind the node server.
Would be great if someone gives me a hint how to solve it or ghchat is only for small amount of users?
it can't support large amount of users?
The text was updated successfully, but these errors were encountered: