Code RoomSync-over-async thread starvation
HardPrep Room Coding #2787

Sync-over-async thread starvation

On-callConcurrencySenior–Staff~40 min

A C#/.NET async web service (ASP.NET Core) that normally handles 30k RPS on a small thread pool starts collapsing under a moderate load increase: throughput craters, latency climbs to seconds, and the runtime keeps slowly adding threads (you see the thread count creeping up over minutes and brief recoveries each time a thread is injected). CPU is only ~40%. A recent change added a call into an older library method that is synchronous and does network I/O, wrapped as `SomeLegacyClient.GetData()` and called with `.Result` / `.GetAwaiter().GetResult()` from inside an async handler. How do you triage and mitigate?

What a strong answer looks like

Stop the bleeding first (mitigate), then form hypotheses from real signals. Separate root cause from symptom, communicate status as you go, and close with what prevents a repeat.

0:00 of about 40 min
Which questions mattered is sealed until you submit. Telling you now would just be handing over the edge cases.