Soru

Zorluk: OrtaElastic Load Balancing Health Checks and Troubleshooting

A SysOps administrator configures an Application Load Balancer (ALB) to route traffic to Amazon EC2 instances hosting a web application. The target group is configured to perform HTTP health checks on port 80 using the default path `/`. To meet security requirements, the administrator implements Basic Authentication at the web server level across the entire website. Shortly after, the ALB target group marks all EC2 instances as unhealthy. Which configuration change will resolve the target group health check failures?

  1. A
    Update the target group health check settings to include the Basic Authentication credentials within the custom HTTP request headers.
  2. B
    Configure an Amazon Route 53 failover routing policy to redirect client requests to a static error page hosted in an Amazon S3 bucket.
  3. Configure a dedicated, unauthenticated path such as `/health` on the web server, and update the target group health check path to point to this new path.Cevap
  4. D
    Modify the target group's successful response matcher code configuration to accept HTTP 401 status codes as healthy.

Cevap

Configure a dedicated, unauthenticated path such as `/health` on the web server, and update the target group health check path to point to this new path.
The correct option is to configure a dedicated, unauthenticated path such as `/health` on the web server, and update the target group health check path to point to this new path. Application Load Balancer health checks do not support sending authentication credentials. By creating an unauthenticated path specifically for health checks, the ALB can verify the web server is running and responding with an HTTP 200 OK without triggering the Basic Authentication prompt.

Adım Adım Çözüm

1
Identify the cause of the target group marking the instances as unhealthy.
The web server returns an HTTP 401 Unauthorized status code to the health check request because of the newly implemented Basic Authentication on the default `/` path.
The default successful response matcher for ALB health checks is HTTP 200, so a 401 response is interpreted as a health check failure.
2
Create a dedicated health check endpoint on the web server that bypasses Basic Authentication.
An unauthenticated path, such as `/health`, is configured to return an HTTP 200 OK status code when the web server is operational.
ALB health checks do not support passing authentication credentials or headers, so the path must be publicly accessible to the ALB nodes.
3
Update the Target Group health check path configuration in AWS.
The Target Group now sends health check requests to the dedicated `/health` path.
This allows the ALB to verify the web server's health status without being blocked by Basic Authentication rules.

Anahtar Kavram

Elastic Load Balancing Health Checks and Authentication
Tahmini Süre:1m 30s
Bu soruyu puanla