4 ms·
Couldn't Node just use a system thread per every accepting socket per port and then signal that thread to block when oh-shit-panic mode kicks in? I doubt very m
by rubiquity 11y ago
Couldn't Node just use a system thread per every accepting socket per port and then signal that thread to block when oh-shit-panic mode kicks in? I doubt very many Node programs are accepting on more than one port anyway.
- jkarneges 11y agoI think Node does a non-blocking accept in the main thread rather than an alternate thread, but in any case, yes, the solution would be to stop accepting when some maximum open connection count is reached.
- AdieuToLogic 11y agoOr... Have a machine fronting the ones running any system lacking the ability to manage incoming request rates perform the load balancing/throttling, using something like: http://www.haproxy.org http://www.haproxy.org Best fight? Not to be in one.