"
 
 
 
ASP.NET (snapshot 2017) Microsoft documentation and samples

SignalR Connection Density Testing with Crank

by Tom FitzMacken

This article describes how to use the Crank tool to test an application with multiple simulated clients.

Once your application is running in its hosting environment (either an Azure web role, IIS, or self-hosted using Owin), you can test application’s response to a high level of connection density using the Crank tool. The hosting environment can be an Internet Information Services (IIS) server, an Owin host, or an Azure web role. (Note: Performance counters are not available on Azure App Service Web Apps, so you will not be able to get performance data from a connection density test.)

Connection Density refers to the number of simultaneous TCP connections that can be established on a server. Each TCP connection incurs its own overhead, and opening a large number of idle connections will eventually create a memory bottleneck.

The SignalR codebase includes a load-testing tool called Crank. The latest version of Crank can be found in the Dev branch on GitHub. You can download a Zip archive of the Dev branch of the SignalR codebase here.

Crank may be used to fully saturate the server’s memory in order to calculate the total number of idle connections possible on the server hardware. Alternatively, you may also use Crank to load test the server under a certain amount of memory pressure, by ramping up connections until a specific count or a specific memory threshold is reached.

When testing, it is important to use remote client(s) to avoid any competition for resources (i.e., TCP connections and memory). Monitor the client(s) to ensure that they are not hitting any bottlenecks that may prevent the server from reaching its full capacity (memory or CPU). You may need to increase the number of clients in order to fully load the server.

Running a Connection Density Test

This section describes the steps needed to run a connection density test on a SignalR application.

  1. Download and build the Dev branch of the SignalR codebase. In a command prompt, navigate to <project directory>.AspNet.SignalR.Crank.
  2. Deploy your application to its intended hosting environment. Make a note of the endpoint that your application uses; for example, in the application created in the Getting Started tutorial, the endpoint is http://<yourhost>:8080/signalr.
  3. Install SignalR performance counters on the server. If your application is running on Azure, see Using SignalR Performance Counters in an Azure Web Role.

Once you’ve downloaded and built the codebase, and installed performance counters on your host, the Crank command-line tool can be found in the src\Microsoft.AspNet.SignalR.Crank\bin\Debug folder.

Available options for the Crank tool include:

Example

The following command will test a site called pfsignalr on Azure that hosts an application on port 8080 with a hub named “ControllerHub”, using 100 connections.

crank /Connections:100 /Url:http://pfsignalr.cloudapp.net:8080/signalr





Comments ( )
<00>  <01>  <02>  <03>  <04>  <05>  <06>  <07>  <08>  <09>  <10>  <11>  <12>  <13>  <14>  <15>  <16>  <17>  <18>  <19>  <20>  <21>  <22>  <23
Link to this page: //www.vb-net.com/AspNet-DocAndSamples-2017/aspnet/signalr/overview/performance/signalr-connection-density-testing-with-crank.htm
<SITEMAP>  <MVC>  <ASP>  <NET>  <DATA>  <KIOSK>  <FLEX>  <SQL>  <NOTES>  <LINUX>  <MONO>  <FREEWARE>  <DOCS>  <ENG>  <CHAT ME>  <ABOUT ME>  < THANKS ME>