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.)
- Configure the Auto Scaling group to use ELB health checks instead of the default EC2 health checks.Answer
- Configure the target group health check to use TCP protocol on port 50051.Answer
- CConfigure the target group health check to use HTTP protocol on port 80 to minimize CPU usage on the EC2 instances.
- DConfigure 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.
- EConfigure 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
Key Concept
Auto Scaling Group and Elastic Load Balancing health check synchronization for custom service ports