Health check cho target group
Load balancer chỉ định tuyến request tới các target ở trạng thái healthy; trạng thái này được xác định bằng health check gửi định kỳ tới từng target.
ALB đánh dấu i-2 là unhealthy, trong khi kỹ sư SSH vào instance và xác nhận ứng dụng vẫn hoạt động. Load balancer chỉ dựa vào kết quả health check: gọi một path trên từng target theo chu kỳ (mặc định 30 giây với target type instance hoặc ip). Quan sát đường đi của health check và vị trí bị chặn:
Chọn một tình huống, sau đó nhấn nút chạy. Bật cấu hình khắc phục và chạy lại để so sánh kết quả.
- Target unhealthy trong khi ứng dụng vẫn hoạt động: kiểm tra security group có cho phép traffic từ load balancer hay không, và health check path có chính xác hay không.
- Để Auto Scaling group thay thế instance mà load balancer đánh dấu unhealthy: bật ELB health check cho Auto Scaling group.
Health checks for target groups
A load balancer routes requests only to targets in the healthy state; that state is determined by health checks sent periodically to each target.
The ALB marks i-2 as unhealthy, while an engineer who connects to the instance over SSH confirms the application still works. The load balancer relies only on health check results: it calls a path on each target periodically (every 30 seconds by default for the instance or ip target type). Follow the health check’s path and see where it is blocked:
Chọn một tình huống, sau đó nhấn nút chạy. Bật cấu hình khắc phục và chạy lại để so sánh kết quả.
- Target unhealthy while the application still works: check whether the security group allows traffic from the load balancer and whether the health check path is correct.
- For the Auto Scaling group to replace instances the load balancer marks as unhealthy: turn on ELB health checks for the Auto Scaling group.