Health group là gì?

health groupsmanagement.endpoint.health.group Actuator & Observability

Nhóm các `HealthIndicator` trong Spring Boot Actuator, được expose ở `/actuator/health/{group}`. Boot có sẵn nhóm `liveness` và `readiness` cho probe của Kubernetes; có thể thêm indicator bằng `management.endpoint.health.group.<name>.include`.

EN: A named set of `HealthIndicator`s in Spring Boot Actuator, exposed at `/actuator/health/{group}`. Boot provides `liveness` and `readiness` groups for Kubernetes probes; add indicators with `management.endpoint.health.group.<name>.include`.

Thử một câu hỏi phỏng vấn

Câu 1 Dễ Một đáp án

Trong Kubernetes, khác biệt giữa khi liveness probe fail và khi readiness probe fail là gì?

  1. A
    Liveness fail thì container bị restart; readiness fail thì pod bị gỡ khỏi endpoint của Service, không restart Đây đúng là ngữ nghĩa của hai loại probe.
  2. B
    Cả hai đều restart container, chỉ khác thời gian chờ Readiness không bao giờ restart container.
  3. C
    Liveness fail thì pod bị gỡ khỏi Service; readiness fail thì pod bị xoá Bị đảo ngược và sai: readiness không xoá pod.
  4. D
    Readiness chỉ được kiểm tra một lần lúc khởi động Readiness được kiểm tra suốt vòng đời pod, không chỉ lúc khởi động.
Xem đáp án và giải thích

Spring Boot map hai khái niệm này vào LivenessState (CORRECT/BROKEN) và ReadinessState (ACCEPTING_TRAFFIC/REFUSING_TRAFFIC), expose ở /actuator/health/liveness và /actuator/health/readiness. Với app khởi động chậm, nên thêm startup probe để liveness không giết pod trước khi app kịp sẵn sàng.

6 câu hỏi dùng thuật ngữ Health group
Luyện hết trong ứng dụng, có chấm điểm và lưu câu sai.

Đăng ký và luyện

Thuật ngữ cùng chủ đề

Nhớ lâu hơn bằng cách luyện

Đọc định nghĩa thì dễ quên, trả lời câu hỏi thì nhớ lâu. Thử ngay, miễn phí.

Đăng ký miễn phí