Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How Many Network Connections Can a Computer Support?

When writing a custom server, what are the best practices or techniques to determine maximum number of users that can connect to the server at any given time?

I would assume that the capabilities of the computer hardware, network capacity, and server protocol would all be important factors.

Also, do you think it is a good practice to limit the number of network connections to a certain maximum number of users? Or should the server not limit the number of network connections and let performance degrade until the response time is extremely high?

like image 469
Jon Ball Avatar asked Sep 16 '08 23:09

Jon Ball


People also ask

How many network connections can a computer handle?

Modern versions of Windows (7, 8, & 10) and macOS allow up to 20 concurrent connections.

How many TCP connections can Windows 10 handle?

Attachments: Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Can a PC have 2 network connections?

You just plug them into both networks. Your machine with then get two IP addresses (if you are using DHCP) and will get two default routes. No which route will be used depends on your machine. Generally, you can manipulate the routing or use a routing protocol to manage both connections.

How many connection are there in CPU?

A typical user limit is 8192 but it can usually be set higher.


3 Answers

Dan Kegel put together a summary of techniques for handling large amounts of network connections from a single server, here: http://www.kegel.com/c10k.html

like image 75
Allen Avatar answered Sep 21 '22 04:09

Allen


In general modern servers can handle very large numbers of concurrent connections. I've worked on systems having over 8,000 concurrently open TCP/IP sockets.

You will need a high quality servicing interface to handle that kind of load, check out libevent or libev.

like image 37
Don Neufeld Avatar answered Sep 19 '22 04:09

Don Neufeld


That is a good question and it definitely is situational. What is your computer? Do you have a 4 socket machine filled with Quad Core Xeons, 128 GB of RAM, and Fiber Channel Connectivity (like the pair of Dell R900s we just bought)? Or are you running on a p3 550 with 256 MB of RAM, and 56K modem? How much load does each connection place on your server? What kind of response is acceptible?

These are the questions you need to answer. I guess the best way to find the answer is through load testing. Create a unit test of the expected (and maybe some unexpected) paths that your code will perform against your server. Find a load testing framework that will allow you to simulate 10, 100, 1000, 10000 users performing those tasks at the same time.

That will tell you how many connections your computer can support.

The great thing about the load/unit test scenario is that you can put in response time expectations in your unit tests and increase the load until you fall outside of your response time. If you have a requirement of supporting X number of Users with Y second response, you will be able to demonstrate it with your load tests.

like image 32
Michael Brown Avatar answered Sep 21 '22 04:09

Michael Brown