تجويع الخيوط
في هذا الدرس 4 موضوعات
هذا الدرس مخطط له. يعرض المخطط أدناه الموضوعات التي سيغطيها، ولم يُنشر الدرس الكامل بعد.
نص الدروس والتمارين باللغة الإنجليزية، بينما تبقى واجهة الموقع وعناوين الدروس بالعربية.
في هذا الدرس
recognize and diagnose exhausted thread pools.
الموضوعات المخطط لها
- Symptom: latency climbs while CPU stays low; requests queue.
- Causes: blocking calls on a small pool, a slow dependency holding threads, a pool used for both work and waiting (pool deadlock).
- Evidence: take thread dumps a few seconds apart; many threads waiting in the same call point to the culprit; check pool queue depth and active counts metrics.
- Fixes: timeouts, bulkheads (separate pools per dependency), bounded queues with load shedding, virtual threads for blocking I/O where suitable (verify version support and pinning issues).
تفاصيل المخطط المبدئي
عرض عملي
Thread dump excerpt: 200 http-nio-exec threads in WAITING inside a payment client read(). Interpretation: dependency slowness plus no timeout.
اختبر فهمك
CPU is low yet requests are slow. What do you suspect?
أظهر الإجابة
Threads blocked waiting, such as pool exhaustion from a slow dependency.
التطبيق
طبّق هذا الدرس بمختبر الوحدة وتمارينها واختبارها.
تعليم الدرس كمكتمل اختياري ويمكنك التراجع عنه في أي وقت. يبقى تقدمك محفوظًا في هذا المتصفح.