Background: Storytelling
In our previous article, we employed the use of `Thread.Sleep` to demonstrate thread injection in a thread pool under a starvation scenario. We observed a steady increase of approximately 1 thread every 1 second, which was barely sufficient to handle the surge in incoming requests. The obvious consequence was a significant buildup in the thread pool queue, putting the C# team's optimization prowess to the test. As expected, the team responded by introducing ingenious solutions to address this issue. In this article, we will delve into the measures taken to counter this DDOS-like attack on the thread pool and explore the optimization techniques employed by the team.