
Answer-first summary for fast verification
Answer: Install the Stackdriver custom metrics adapter and configure a horizontal pod autoscaler to use the number of requests provided by the GCLB.
The goal is to scale the NGINX frontend deployment using an appropriate Service Level Indicator (SLI). An SLI should measure a key aspect of service performance that correlates with user demand or system health. Here, scaling should be driven by traffic load to maintain responsiveness. Option C is the best choice because it uses the number of requests from the Google Cloud Load Balancer (GCLB), which directly reflects incoming traffic volume—a core SLI for autoscaling web applications. Stackdriver (now Cloud Monitoring) custom metrics adapter allows GKE's Horizontal Pod Autoscaler (HPA) to consume this external metric. This approach is efficient and leverages Google Cloud-native tools without modifying the NGINX deployment. Options A and D are suboptimal: A uses probe response times, which are unreliable for scaling as they aren't user-traffic indicators, and D requires exposing NGINX metrics, adding complexity. Option B focuses on vertical scaling (resource adjustments) rather than horizontal scaling (pod replicas) and doesn't address SLI-based demand.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
To scale the frontend deployment of your NGINX-based application on Google Kubernetes Engine (GKE) exposed via an HTTP Google Cloud Load Balancer (GCLB) ingress, which Service Level Indicator (SLI) should you use?
A
Configure the horizontal pod autoscaler to use the average response time from the Liveness and Readiness probes.
B
Configure the vertical pod autoscaler in GKE and enable the cluster autoscaler to scale the cluster as pods expand.
C
Install the Stackdriver custom metrics adapter and configure a horizontal pod autoscaler to use the number of requests provided by the GCLB.
D
Expose the NGINX stats endpoint and configure the horizontal pod autoscaler to use the request metrics exposed by the NGINX deployment.
No comments yet.