Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Who uses Socket.IO in production? #4557

Unanswered
darrachequesne asked this question in General
Discussion options

Hi! We'd like to showcase public projects that uses Socket.IO on our website: https://socket.io/

If you are interested, please provide:

  • a short description of your project
  • the peak number of connected users
  • the adapter that you use (if applicable)
  • an URL of your website

Thanks in advance!

You must be logged in to vote

Replies: 2 comments 3 replies

Comment options

I would like to share my project although my peak number of connected users is not impressive due to the nature of my product.

Our product is call center web application and our customers are small business owners. They use our web-app to let their agents make phone call. During the call process the server needs to deliver several call status related messages to the agent's browser so the web app can update the UI accordingly, e.g. callee rings, callee answers, callee hangs up (these are very basic messages but we have up to 20 call related messages). The agents our customers have in total is around 2000 (I don't know the exact number) so the peak number of connected users won't exceed that but the message we send is much more than that (the more phone call they make the more message we send). Take November 11's data (the biggest online shopping day in China) as example, during 9:00 to 9:30 am I have 1022 agents log in (1022 connection) but I send 124,026 messages.

The adapter that I use is socket.io-redis 6.x
The URL of my employer's website is https://www.emicnet.com/ and the web-app is https://www.emicnet.com/hujiaozhongxin (Chinese only)

BTW, the main reason I share my project is not so much about showcasing but as learning and sharing. I guess my use of sockect.io is not typical, e.g. I don't use the typical feature like rooms/namespaces as my connection is always one on one, although through the [RFC] Reconnection discussion I mentioned that someone suggested I could use room to send the missing message during network hiccups.

I also like to point out that the adapter is a must for server development because we always start more than one server (with docker) so cross ws server communication is a must. So I also like to see others' usage of the adapter.

Last but not the least @darrachequesne is very helpful that basically roots out my thoughts of using other ws solution (say uWebSockets.js lol)

You must be logged in to vote
0 replies
Comment options

I use Socket.IO for Pokemon Chess: https://pokemonchess.com

The idea was by a YouTuber called Little Z and I implemented it, using Socket.IO for the multiplayer element.

It's had over 250 connected users at once for sure, and the real-time 30 minute peak on Google Analytics was over 1,800.

I'm using PM2 to run it on the CentOS server that the website sits on.

However... After about 5 days of running, the socket server will start randomly erroring for users, for no reason I can discern. PM2 shows no errors in the log, and in the client console it either shows just failed or WebSocket Connection failed: with no reason listed. After I restart the file with PM2 it runs beautifully again. I'm wondering if I'm missing some sort of garbage collection or cleanup?

You must be logged in to vote
3 replies
Comment options

darrachequesne Jun 2, 2023
Maintainer Author

Thanks for the report. Do you have any heap dump or something that could help us?

Comment options

My friend who is much more familiar with Linux had a look with me, and we think the server may have been hitting the 1024 "open files" limit which is discussed on the Performance Tuning page of the Socket.io website.
We also noticed a single IP had over 100 connections to the port I'm using for the socket.io server but none for the 443 port, showing that they're connecting despite not actually being on the client facing website at all. I think my plan to fix that is include a query parameter on the client side, and the server will automatically disconnect any clients who try to connect without the query parameter.
Next time the server is struggling I'll check the open files count and look to making that change to add a query, is there anything else you can suggest?

Comment options

@ElXando how did you sent and check the query parameter :) ? Could not they "see" what query parameter you send and replicated it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

AltStyle によって変換されたページ (->オリジナル) /