4 ms·
Yes but only if connections aren't reused.
by AYBABTME 4y ago
Yes but only if connections aren't reused.
- hinkley 4y agoI keep having to turn off keepalive between the service and the reverse proxies and I bet this is part of why. I think Node 12 introduced LIFO queuing for connection pools because they found the cost of silent disconnects from the server to be too high. They got much better histograms by using the most recently freed connection instead of round robin of available sockets.
- mst 3y agoI don't remember the URL (sorry) but I saw something recently talking about Facebook's queueing approach for requests being FIFO under normal load and LIFO when overloaded, so that under an overload state you serve the number of requests you -can- serve reasonably quickly rather than -everything- timing out. For node's situation that sounds probably workable but I think a lot of the time I'd prefer to send periodic keepalives to the idle pool connections. However, you can't exactly bake -that- into the runtime so I can see their argument and perhaps the best thing would be "both, plus periodically do a clean shutdown on excess pool members until you need them again."
- hinkley 3y agoSYN Flooding is solved by holding a lottery and dropping a certain fraction of all traffic, rather than looking for patterns that could be gamed.