views:

57

answers:

4

I am creating a .net application, with a Sql Server db engine. I would like my site to be accessed by thousands of users per second. What does the number of connections rely on? How many connection can IIS hold, and Sql Server?

A: 

That is no problem for Windows and or SQL Server:

Windows is configured by default to handle 1000 to 2000 concurrent tcpip connections. For SQL Server, it will also depend on the licenses and or hardware which you did not specify. What kind of hardware is SQL going on ?

JonH
+1  A: 

The number of connections is really dependent on the physical makeup and optimization of your server and how far you can push it. You can down-throttle the number of concurrent connections in the IIS configuration as well as in SQL if you want to put a limit on how many connections should be allowed.

George
+1. The uppe rlimit pretty much (unless you need more than 1 connection per page) is the number of pages being processed in parallel (a.k.a. IIS threads). That said, SQL Server CAN hold thousands of connections. Provide enough RAM.
TomTom
A: 

You can set a limit yourself, or find out what limit has already been put in place in your IIS server settings.

http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/b2b550de-f655-4fb6-9bed-dfc9583b6700.mspx?mfr=true

Joel Kennedy
+1  A: 

First, there is a difference between connections and connection pools. Is it good to look into that, as it makes a huge difference in performance. If you need a reference, I can dig one up, but google/bing is your friend here. The key takeaway is: keep the number of connections pool to a minimum.

With that said, the number of connection depends on two things.

  1. Are you using Windows Auth? If so, every distinct user will cause a distinct connection/connection pool

  2. If you are using SQL Auth, then each different connection string will cause a new pool to be created (even a single space difference will cause a new pool).

In regards to the scaling question, both IIS and SQL Server can handle an very high number of connections. If you are running into connection limits, you should probably take a look at the application design.

Erick

Erick T