The Real Fullstack

The Noisy Neighbour

Checkout code didn't change. Why does it slow down and get evicted at 2 a.m. every night?

مهندس8 دقيقةمختبر تصحيح الأخطاءمختبر الأداء
kubernetesresource-limitsprometheushpa

لم يُترجم هذا التحدي إلى العربية بعد. أنت تقرأ النسخة الإنجليزية.

المهمة:Read the node and pod events, name the root cause, and isolate workloads so one job can't starve another.السياق · أهداف التعلّم ▾

Larkspur runs a nightly report CronJob in the same cluster as checkout. Neither declares CPU or memory requests. The scheduler packs them onto the same node, the batch takes almost all of it, checkout latency jumps 35× and Kubernetes evicts checkout pods first.

المهمة: Read the node and pod events, name the root cause, and isolate workloads so one job can't starve another.

أهداف التعلّم

  • Understand resource requests (scheduling) and limits (enforcement).
  • Know how QoS classes decide who gets evicted first.
  • Separate batch and latency-sensitive workloads.
المحاكاةمحاكاة
worker node (8 cores)checkout podreport-batch pod
تشغيل المحاكاة
# checkout (latency-sensitive)resources:  requests: { cpu: 500m, memory: 512Mi }   # scheduler reserves it; HPA can compute utilisation  limits:   { memory: 512Mi }              # Burstable/Guaranteed class: not evicted first---# report-batch (throughput job) — bounded, and kept off the checkout nodesresources:  requests: { cpu: "2", memory: 4Gi }  limits:   { cpu: "2", memory: 4Gi }nodeSelector: { pool: batch }

تبسيط

Three symptoms with deterministic fixes. Real clusters also use LimitRanges, ResourceQuotas and priority classes. نموذج تعليمي — الأرقام توضّح سلوكًا وليست قياسات أداء.

المفاهيم

تحديات ذات صلة

المراجع