Test Client-Server Connectivity Through Stress
NCache provides the Test-Stress tool to verify client-server connectivity by simulating cache operations against a running cache. Run Test-Stress via NCache Management Center or from a client machine through PowerShell to confirm connectivity and successful cache operations. Monitor counters such as Requests/sec, Additions/sec, Fetches/sec, Gets/sec, and expirations using NCache Monitor, Statistics view, or PerfMon during the test.
Note
You can simulate the usage of different store types and monitor Cache Counters for your cache by following the same steps listed below.
Note
Test-Stress behavior varies by in-memory store type:
- Distributed Cache: Normal cache data is inserted and fetched from the cache.
- Pub/Sub Messaging Cache: Topics, publishers, and subscribers are created, along with message data.
Prerequisites
- The cache is created and started.
- The client node is added to the cache configuration.
- The client machine can reach the cache servers over the required ports.
- The client has the required NCache client installation and configuration.
- If security is enabled, valid cache credentials are available.
Using the NCache Management Center
Follow the steps mentioned below to verify client-server connectivity under stress through the NCache Management Center:
Launch the NCache Management Center by browsing to http://localhost:8251 or
<server-ip>:8251.From the left navigation bar, click on Clustered Caches.

Create a new cache or select the cache for which you want to verify client-server connectivity.
Make sure that the cache is started.
You can run and monitor Test-Stress in either of the following ways:
Option 1: Run Test-Stress from the Toolbar
Select the cache for which you want to verify client-server connectivity.
On the toolbar, click on the Test-Stress button, which opens up a dialog box containing various time options.

From the options list, you can select how much time you want Test-Stress to run. The options are:
- 10 seconds
- 30 seconds
- 1 minute
- 3 minutes
- 5 minutes
Click Start to begin the stress test.
You can then open Monitor or Statistics to observe the cache counters while the test is running.
Option 2: Open Monitor or Statistics from the Cache Menu
- Select the cache for which you want to verify client-server connectivity and click on the "..." button against it. This opens a dropdown menu of various operations that you can perform on the cluster.
From these options, select Monitor Cluster if you want to visually see the counters updating, or select Show Statistics if you want to view the statistics of the selected cache.
Once inside either view, follow the steps in the sections below to run Test-Stress and observe counters.
View Client Activity Through NCache Monitor
The NCache Monitor provides a graphical dashboard to monitor various cache counters. If Test-Stress is running successfully, the client dashboard and cache counters show active operations. If you choose to view client activity through the NCache Monitor, follow these steps:
After clicking on the Monitor button, click on the Test-Stress button.
From the dropdown, you can choose the Test-Stress Timer for 10 or 30 seconds or 1, 3, or 5 minutes, depending on your choice.
As soon as you press the Start button, you can visualize the various cache operations that take place on the client dashboard.
During the selected duration, Test-Stress performs cache operations through the client connection. You can view data being added to the cache via the counters displayed in the NCache Monitor. After the set expiration interval has elapsed, the counters will show data being removed from the cache.

If the counters update, the client is successfully connected to the cache servers and is performing cache operations.
View Client-Server Operations Through NCache Statistics
NCache Statistics provides a report view of Cache Counters. You can use it to confirm that requests from the client are reaching the cache.
- On the statistics board, click on the Test-Stress button. This opens up a dialog box through which you can customize your simulation.

In the dialog box, you can choose the Test-Stress Timer for 10 or 30 seconds or 1, 3, or 5 minutes, depending on your choice.
As soon as you press the Start button, you can view the statistics for different operations on the cache, like Additions/sec and Fetches/sec.
You can view the data being added to the cache through the counters shown on the screen. After the set expiration interval has elapsed, the counters will show the data being removed from the cache.

If these counters update, the client-server connection is active, and cache operations are being processed.
Using PowerShell
You can also verify client-server connectivity by running Test-Stress from the client machine using the Test-Stress cmdlet.
Test-Stress -CacheName demoCache
See Also
NCache Counters
Monitor Caches using NCache Management Center
Test-Stress PowerShell Reference
Add Client Nodes
Remove Client Nodes