简体   繁体   中英

How can i know the maximum number of connections to a .net webservice?

I have a webservice(version 4.0) on server. I didn't change anything in its application pool settings. I would like to know the maximum number of concurrent connections it can handle. I have windows server 2012 with 64 GB memory and dual processor 2.3 GHz The server runs SQL and other websites and webservices

  1. The number of simultaneous connection depends on your hardware as well as current state of resource utilisation.
  2. Under the hood, based on your application pool settings and underlying hardware resources, worker threads are created to honour the incoming requests. This is created from the thread pool and you dont have to worry about managing it.

To my understanding, the IIS handles the incoming requests on the best effort basis. To really calculate the number of request it can handle, I would write a small program and count the number of simulataneous connection in global.aspx as below.

void Session_Start(object sender, EventArgs e)
{
    // Code that runs when a new session is started
    Application.Lock();
    Application["ActiveConnections"] = (int)Application["ActiveConnections"] + 1;
    Application.UnLock();
}

Also do refer to this link

As per this link, IIS 8 on Windows Server 2012 doesn't have any fixed concurrent request limit, apart from whatever limit would be reached when resources are maxed.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM