K
K
komarevtsev2016-01-22 01:33:11
Node.js
komarevtsev, 2016-01-22 01:33:11

socket.io antiddos?

There is a project that uses socket.io
In the console, anyone can emit events. You can do this in a loop something like:
for (var i = 0; i < 100000; i++) {
socket.emit('any_data' , 5);
}
Now I've made the protection on the server and I'm checking the number of operations per second for socket.id
But I don't think this is an option.
Maybe there are better options or where to read about such protection?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander Litvinenko, 2016-01-22
@edli007

Monit , if I’m not mistaken, is the name of the program, in our case it does not allow the node to load the processor more than 90%, thus maintaining the responsiveness of the system.

T
Timur Shemsedinov, 2016-01-22
@MarcusAurelius

And it’s right that they did it on the server, it’s useless to do it on the client, because you can write such a cycle not only in the browser console, but also in the node console on another machine, and without protection on the server with the help of counters, you won’t be saved anyway .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question