System Design · Karat · Medium
A multithreaded service is suffering from thread starvation, and its performance keeps getting worse over time. Explain how you would collect a snapshot of what the threads are doing and how you would interpret that information. Then explain how you would distinguish between two possible causes: a thread pool that is simply too small for the load, versus threads that are stuck waiting on slow downstream dependencies.