Comments (8)
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
from ghchat.
I already tried it but it doesn't work. Is it related with data amount which is transferred by socket?
from ghchat.
@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.
from ghchat.
Hi @sarawut11 , are there any updates?
from ghchat.
@aermin I splitted the server into two servers - one for main node server, another one for socket only server.
And run 1 main node server and 5 socket servers, in a word, applying load balancer in nginx.
Let me see how it goes and let you know.
Note sure if this can be a solution tho but I believe it can improve something at least.
from ghchat.
@aermin I splitted the server into two servers - one for main node server, another one for socket only server.
And run 1 main node server and 5 socket servers, in a word, applying load balancer in nginx.
Let me see how it goes and let you know.
Note sure if this can be a solution tho but I believe it can improve something at least.
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.
from ghchat.
I could resolve the issue @aermin by refactoring the code architecture.
Thank you.
Anyway, I think, it's worth to discuss with you via live chat.
Can you provide me your contact info?(skype or telegram or discord id?)
You can email me [email protected]
from ghchat.
@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.
telegram group link:
https://t.me/joinchat/Kabe8hReKws36vfLhHsY6Q
Look forward to taking some discussion with you.
from ghchat.
Related Issues (15)
- photo url
- Something wrong caused by missing 'secret.js' HOT 3
- koa2- remove HOT 4
- 问题反馈 HOT 2
- 引进eslint
- 关于ESLint检测未修复的问题与改进建议 HOT 2
- UI改版
- safari 浏览器登录后刷新会先连接再断开 HOT 7
- api设计问题 HOT 3
- 产品设计及定位 HOT 2
- 客户端中InitApp/index.js为什么会被默认初始化并执行 HOT 4
- demo? HOT 2
- 线上SSL证书过期了
- multilingual solution with I18 HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ghchat.