Stumbled across something interesting, but I doubt I have the reach to test how widespread this is.

Here goes nothing, anyway:

What is the maximum number of simultaneous (i.e established) HTTP connections a server can support, and why?

I’ll post my reason for asking if I get any replies 😉

#quiz #tcp #http

@decoderwheel if it's configured to not have its own artificial limit, an important constrained resource is file handles, since each socket consumes one. So a reasonable answer is: the number of allowed file handles minus the ones in use by other software.

@erluko Thank you for responding, I feel less lonely now 😁

The reason I asked the question was that I came across someone who was apparently an ex-FAANG senior engineer who thought that the answer was 65535. And then I did some searching and it turned out that that belief is surprisingly widespread, and I thought it was fascinating how easily people can get the wrong end of the stick.

@decoderwheel The variable type used to hold the count of open file handles could force that max, but think it hasn't been the case for a while. It sounds like people are either remembering very old type limits or repeating often suggested max configuration values. My answer comes from having built a successful fh exhaustion attack and then working on mitigations for it :)

This is the best description of the limit that can find at the moment: https://www.cyberciti.biz/tips/linux-procfs-file-descriptors.html

Linux: Find Out How Many File Descriptors Are Being Used - nixCraft

While administrating a box, you may wanted to find out what a processes is doing and find out how many file descriptors (fd) are being used. You will surprised to find out that process does open all sort of files: => Actual log file => /dev files => UNIX Sockets => Network sockets => Library files /lib /lib64 => Executables and other programs etc In this quick post, I will explain how to to count how many file descriptors are currently in use on your Linux server system.