Search code examples
node.jswebsocketbroadcast

Can I broadcast to a huge number of webSocket clients


i have developed a web application with node.js, i want to know if i can broadcast to a very large number of connected clients simultaneously.

I want to know if there are 100 customers or 1000 customers , my application works well without problems.

in short, how many customers can support the broadcast? And is there a way to test (a software for example) with 100 clients or 1000 clients of webSocket? Because if I want to test it manually I can not open 1000 browsers simultaneously to do the test.


Solution

  • i want to know if i can broadcast to a very large number of connected clients simultaneously.

    Yes, you can.

    I want to know if there are 100 customers or 1000 customers , my application works well without problems.

    Only you can answer that. We don't have access to your application to tell you how well it works. Test your application.

    in short, how many customers can support the broadcast?

    That depends on many factors... we couldn't possibly answer this for you.

    And is there a way to test (a software for example) with 100 clients or 1000 clients of webSocket?

    There are services for load testing, but you might find it easiest to write your own script which creates thousands of client connections and emulates what you think users will do. Be careful though, in that real user loads are often surprising.

    Set up your architecture in such a way that you can expand to many hosts, if needed.