Question

Difficulty: MediumAuto Scaling and Elastic Load Balancing (ELB)

A company is deploying a latency-sensitive gRPC microservice on a fleet of Amazon EC2 instances managed by an Auto Scaling group (ASG). The gRPC service communicates over TCP port 50051. A Network Load Balancer (NLB) distributes client traffic to these instances. The solutions architect needs to ensure that the NLB only routes traffic to healthy instances and that the ASG automatically replaces any instances where the microservice application has crashed. Which two configurations should the solutions architect implement to meet these requirements? (Select TWO.)

  1. Configure the Auto Scaling group to use ELB health checks instead of the default EC2 health checks.Answer
  2. Configure the target group health check to use TCP protocol on port 50051.Answer
  3. C
    Configure the target group health check to use HTTP protocol on port 80 to minimize CPU usage on the EC2 instances.
  4. D
    Configure a subnet Network ACL rule allowing inbound TCP traffic on port 50051, relying on stateful security groups to permit the return outbound health check response traffic.
  5. E
    Configure Amazon Route 53 with a Latency routing policy pointing to the NLB to automatically route client traffic away from individual unhealthy instances.

Answer

Configure the Auto Scaling group to use ELB health checks instead of the default EC2 health checks, and configure the target group health check to use TCP protocol on port 50051.
Configuring the load balancer target group to monitor port 50051 via TCP ensures that the NLB only forwards traffic to instances where the gRPC service is active. Furthermore, changing the Auto Scaling group health check source to ELB ensures that when an instance fails the target group health checks, the ASG will automatically terminate and replace the failed instance, ensuring continuous application availability.

Step-by-Step Solution

1
Analyze the health check requirements for the gRPC application.
Identify that health checks must target the active application port (50051) using TCP protocol because the application runs on port 50051 and does not listen on port 80.
This ensures the load balancer accurately identifies whether the service itself is running.
2
Determine the mechanism to automatically replace failed instances.
Enable ELB health checks on the Auto Scaling group.
By default, the ASG only uses EC2 status checks. Enabling ELB health checks ensures the ASG replaces instances that fail target group health checks.

Key Concept

Auto Scaling Group and Elastic Load Balancing health check synchronization for custom service ports
Rate this question