الفحوصات (Probes) لخدمات JVM
في هذا الدرس 4 موضوعات
هذا الدرس مخطط له. يعرض المخطط أدناه الموضوعات التي سيغطيها، ولم يُنشر الدرس الكامل بعد.
نص الدروس والتمارين باللغة الإنجليزية، بينما تبقى واجهة الموقع وعناوين الدروس بالعربية.
في هذا الدرس
configure the three probes correctly for a Spring Boot service.
الموضوعات المخطط لها
- Startup probe: allows slow JVM start before other probes begin.
- Readiness: should this pod receive traffic now; may include dependencies it needs to serve.
- Liveness: should the pod be restarted; keep it simple and never check the database, or a database outage restarts every pod.
- Spring Boot Actuator exposes liveness and readiness health groups (
/actuator/health/liveness,/actuator/health/readiness). - Set graceful shutdown so in-flight requests finish.
تفاصيل المخطط المبدئي
عرض عملي
startupProbe: { httpGet: { path: /actuator/health/liveness, port: 8080 }, failureThreshold: 30, periodSeconds: 2 }
readinessProbe: { httpGet: { path: /actuator/health/readiness, port: 8080 } }
livenessProbe: { httpGet: { path: /actuator/health/liveness, port: 8080 } }اختبر فهمك
Why must liveness not check the database?
أظهر الإجابة
A database outage would restart all pods and worsen the incident.
التطبيق
طبّق هذا الدرس بمختبر الوحدة وتمارينها واختبارها.
تعليم الدرس كمكتمل اختياري ويمكنك التراجع عنه في أي وقت. يبقى تقدمك محفوظًا في هذا المتصفح.