c-cube / tiny_httpd

Minimal HTTP server using good old threads + blocking IO, with a small request router.
https://c-cube.github.io/tiny_httpd
75 stars 11 forks source link

drop connections when maximum number of active conns is reached #67

Closed c-cube closed 1 year ago

vphantom commented 1 year ago

I hope this becomes optional behavior if you intend to merge it. For us in production, we want for the O/S to backlog new connections when we're at capacity. The second argument to Unix.listen tells the O/S how many connections to accumulate before starting to reject them, and your use of 2 * max_connections for that seems appropriate to me.

c-cube commented 1 year ago

Doesn't seem like a good idea anymore. Closing.