You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+25-3Lines changed: 25 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -124,6 +124,28 @@ The dashboard uses SignalR for real-time updates and includes controls to trigge
124
124
|`/api/admin/reset-all`| POST | Release all memory and reset state |
125
125
|`/api/admin/stats`| GET | Get current simulation statistics |
126
126
127
+
## β±οΈ Request Latency Monitor
128
+
129
+
The dashboard includes a **Request Latency Monitor** that demonstrates how thread pool starvation affects real-world request processing.
130
+
131
+
### How It Works
132
+
133
+
- A dedicated background thread (not from the thread pool) continuously probes `/api/health/probe`
134
+
- Latency is measured end-to-end: request sent β response received
135
+
- Results are broadcast via SignalR to the dashboard in real-time
136
+
137
+
### What You'll Observe
138
+
139
+
| Scenario | Expected Latency | Explanation |
140
+
|----------|-----------------|-------------|
141
+
| Normal operation | < 50ms | Thread pool threads available |
142
+
| Thread pool starvation | 100ms - 30s | Requests queued waiting for threads |
143
+
| Timeout | 30s | No thread became available |
144
+
145
+
### Why This Matters
146
+
147
+
During thread pool starvation, CPU and memory metrics often look normal, but users experience severe latency. The latency monitor makes this invisible problem **visible** - you can watch response times spike from milliseconds to seconds when triggering the sync-over-async simulation.
148
+
127
149
## π§ Configuration
128
150
129
151
Configuration is managed through `appsettings.json`:
@@ -170,15 +192,15 @@ az webapp create \
170
192
--name your-unique-app-name \
171
193
--resource-group rg-perf-simulator \
172
194
--plan asp-perf-simulator \
173
-
--runtime "DOTNETCORE:8.0"
195
+
--runtime "DOTNETCORE:10.0"
174
196
175
197
# Deploy
176
198
cd src/PerfProblemSimulator
177
199
dotnet publish -c Release
178
200
az webapp deploy \
179
201
--resource-group rg-perf-simulator \
180
202
--name your-unique-app-name \
181
-
--src-path bin/Release/net8.0/publish
203
+
--src-path bin/Release/net10.0/publish
182
204
```
183
205
184
206
### Safety Recommendation
@@ -204,7 +226,7 @@ This application is designed to work with Azure App Service diagnostics:
204
226
4.**CPU Profiling** - Capture and analyze CPU traces
205
227
5.**Memory Dumps** - Analyze memory allocations
206
228
207
-
See [azure-monitoring-guide.md](docs/azure-monitoring-guide.md) for detailed instructions.
229
+
See [Azure Monitoring Guide](./docs/azure-monitoring-guide.md) for detailed instructions.
<li><strong>CPU usage</strong> - Current processor utilization</li>
380
381
<li><strong>Memory</strong> - Working set and GC heap sizes</li>
381
382
<li><strong>Thread pool</strong> - Active threads and queue length</li>
383
+
<li><strong>Request latency</strong> - Real-time probe response time (shows impact of thread pool starvation)</li>
382
384
<li><strong>Active simulations</strong> - Currently running problem simulations</li>
383
385
</ul>
384
386
<p>The dashboard uses SignalR for real-time updates and includes controls to trigger each type of simulation.</p>
385
387
</section>
386
388
389
+
<!-- Latency Monitor Section -->
390
+
<sectionid="latency" class="doc-section">
391
+
<h2>β±οΈ Request Latency Monitor</h2>
392
+
<p>The dashboard includes a <strong>Request Latency Monitor</strong> that demonstrates how thread pool starvation affects real-world request processing.</p>
393
+
394
+
<h3>How It Works</h3>
395
+
<ul>
396
+
<li>A dedicated background thread (not from the thread pool) continuously probes <code>/api/health/probe</code></li>
397
+
<li>Latency is measured end-to-end: request sent β response received</li>
398
+
<li>Results are broadcast via SignalR to the dashboard in real-time</li>
399
+
</ul>
400
+
401
+
<h3>What You'll Observe</h3>
402
+
<tableclass="api-table">
403
+
<thead>
404
+
<tr>
405
+
<th>Scenario</th>
406
+
<th>Expected Latency</th>
407
+
<th>Explanation</th>
408
+
</tr>
409
+
</thead>
410
+
<tbody>
411
+
<tr>
412
+
<td>Normal operation</td>
413
+
<td>< 50ms</td>
414
+
<td>Thread pool threads available</td>
415
+
</tr>
416
+
<tr>
417
+
<td>Thread pool starvation</td>
418
+
<td>100ms - 30s</td>
419
+
<td>Requests queued waiting for threads</td>
420
+
</tr>
421
+
<tr>
422
+
<td>Timeout</td>
423
+
<td>30s</td>
424
+
<td>No thread became available</td>
425
+
</tr>
426
+
</tbody>
427
+
</table>
428
+
429
+
<h3>Why This Matters</h3>
430
+
<p>During thread pool starvation, CPU and memory metrics often look normal, but users experience severe latency. The latency monitor makes this invisible problem <strong>visible</strong> β you can watch response times spike from milliseconds to seconds when triggering the sync-over-async simulation.</p>
<p>See <ahref="docs/azure-monitoring-guide.md">azure-monitoring-guide.md</a> for detailed instructions.</p>
670
+
<p>See the <ahref="https://github.com/rhamlett-mms/NETCoreApp/blob/main/docs/azure-monitoring-guide.md">Azure Monitoring Guide</a> for detailed instructions.</p>
0 commit comments