Google Professional Cloud DevOps Engineer Question 113
Select 2Google Cloud PlatformYou are managing a critical e-commerce platform running on Google Kubernetes Engine (GKE). During a marketing event, your system experiences a significant surge in traffic, causing resource contention and degraded performance. What steps should you take to add capacity and ensure system reliability during the event?
- A
Manually scale up the number of nodes in the GKE cluster to handle the increased traffic.
- B
Enable cluster autoscaling in the GKE cluster to automatically adjust the number of nodes based on resource demand.
- C
Increase the number of replicas for critical deployments using a Horizontal Pod Autoscaler (HPA) to distribute the load across more pods.
- D
Upgrade the machine type of the nodes in the GKE cluster to a larger instance type immediately.
- E
Enable vertical pod autoscaling (VPA) for critical workloads to dynamically adjust resource requests and limits for pods.
Show answer and explanation
Correct answers: B, C
Explanation
To handle traffic spikes during events, enabling cluster autoscaling ensures that the GKE cluster can dynamically add nodes to meet demand. Additionally, using a Horizontal Pod Autoscaler (HPA) increases the number of pod replicas for critical deployments, distributing the load effectively. Together, these automated solutions provide a robust and scalable approach to adding capacity without manual intervention, ensuring system reliability during high-demand periods.
- A. Incorrect.
Manually scaling up the cluster can temporarily add capacity, but it is not a recommended approach as it lacks automation and does not dynamically respond to changing traffic patterns.
- B. Correct.
Enabling cluster autoscaling is an appropriate approach as it lets GKE automatically adjust the cluster size based on resource demands, ensuring sufficient capacity during traffic surges.
- C. Correct.
Increasing the number of replicas using a Horizontal Pod Autoscaler (HPA) is a scalable and automated way to handle higher traffic by distributing load across more pods.
- D. Incorrect.
Upgrading the machine type during a traffic surge is risky and time-intensive, as it might involve downtime or disruption to the system.
- E. Incorrect.
Vertical pod autoscaling (VPA) adjusts resource requests and limits for pods, but it is more suited for workloads with fluctuating resource needs rather than handling immediate traffic surges.