
Let's try and break my basic Node.js concurrent app - christosmaris
I build a NodeJS app that uses worker_threads for concurrency. Ultimately, I want to create an app that keeps track of all the online clients on a WebRTC network that I&#x27;ll build.<p>What I want to see is how many clients can it keep track of at the same time.
It identifies clients via their IP (which can be masked). It would be awesome if you could help me find its limits by doing the following:<p>1. Open 4-5 chrome tabs and navigate to https:&#x2F;&#x2F;clientcounter.herokuapp.com&#x2F;total in all of them.<p>2. Open the console and paste the following code:<p>setInterval(()=&gt;{fetch(&quot;https:&#x2F;&#x2F;clientcounter.herokuapp.com&#x2F;subscribe&quot;,{method:&quot;get&quot;,headers:{&quot;x-forwarded-for&quot;:Math.random().toString(36).replace(&#x2F;[^a-z]+&#x2F;g,&quot;&quot;)}}).then(e=&gt;e.json()).then(console.log)},50);<p>3. Let it run for quite some time.<p>4. Tell your friends :)<p>The github repo (in case anyone is curious or would like to help) is: https:&#x2F;&#x2F;github.com&#x2F;christosmaris&#x2F;clientcounter<p>Thanks a lot in advance :D
======
gitgud
Interesting, I think you'd get more participants if you made it an actual
website.

Instead of having to open the devtools and manually paste in the script, why
not just have a script on a HTML page?

------
byteshock
If you’re trying to load test then why not use a load testing tool like Vegeta
or k6? You can use a list of ip addresses and have it set a special header
with an IP address. Then your app could use the ip address in the header to
keep track of clients.

You probably get better and faster results.

