Prepare and test your skills

Prepare and test your skills

Free sample question with answers and detailed explanation below. The Professional Cloud Database Engineer practice bank has an additional 769 practice questions.Try 10 free realistic questions: instant score, no credit card, and no account required.
Your organization operates a mission-critical e-commerce database on Spanner. The workload exhibits gradual daily traffic variations alongside scheduled quarterly promotional events that cause sharp, predictable traffic spikes. You need to implement a capacity planning and automated scaling strategy that meets these requirements:
Which approach should you implement?
Predictive autoscaling and future reservations are Compute Engine features designed to manage virtual machine (VM) capacity within Managed Instance Groups (MIGs). Predictive autoscaling uses machine learning models trained on historical CPU utilization to launch VMs ahead of recurring daily or weekly cycles, while future reservations provide assured VM hardware capacity in a specific zone up to a year in advance.
Your workload ran on self-managed application servers inside a Compute Engine MIG with long VM initialization times and predictable daily or weekly CPU cycles, rather than a managed Spanner database experiencing quarterly promotional events.
Database engineers sometimes confuse infrastructure-level VM capacity tools (MIG predictive autoscaling and Compute Engine reservations) with managed database scaling mechanisms. For Spanner, VM reservations do not apply, and scheduled spikes should be handled using direct scaling schedules.
Combining long-term Cloud Monitoring metric exports to BigQuery with the Spanner Autoscaler tool creates a hybrid proactive and reactive scaling architecture. Exporting metrics overcomes default short-term retention limits so teams can forecast demand across quarters, while combining linear and direct scaling policies automates both daily elasticity and scheduled peak readiness.
newSize = currentSize * currentUtilization / utilizationThreshold, which suits gradual daily load changes. Pairing this with a utilization margin (such as the default 5 percentage points around the threshold) creates a stability buffer so minor workload fluctuations do not trigger constant scaling actions or flapping.5 minutes for scale-up and 30 minutes for scale-down) aligns with hourly maximum-node billing and avoids premature scale-ins.Unlike Compute Engine predictive autoscaling (which only applies to Managed Instance Groups and cannot predict quarterly events) or static over-provisioning, this approach pairs long-term BigQuery capacity forecasting with Spanner-native linear and direct automation to maintain performance at minimal cost.
Static peak provisioning involves inspecting recent Cloud Monitoring utilization graphs—such as high-priority CPU, 24-hour rolling average CPU, or storage utilization—and manually setting a fixed node or processing unit count high enough to absorb the worst-case observed load, with automated scaling policies turned off.
The database served a completely flat, unvarying 24/7 workload with no seasonal or promotional spikes, or if strict operational constraints temporarily prohibited topology changes during a brief, critical event.
While inspecting recent Cloud Monitoring metrics is a helpful starting point for understanding current resource usage, cloud-native elasticity relies on combining long-term historical exports (such as in BigQuery) with automated horizontal scaling to balance availability and cost efficiency.
In the Spanner Autoscaler tool, stepwise scaling adds or removes a fixed, configurable number of nodes whenever utilization crosses a threshold, which works well for workloads with multiple small peaks or plateaus. Margins define a buffer range ([threshold - margin, threshold + margin]) to prevent minor fluctuations from triggering scaling events, while cooldown periods enforce a waiting window after scaling so Spanner can rebalance data splits.
0% removes the stability buffer around the threshold, causing minor workload variations to repeatedly trigger scale-up and scale-down actions.5 minutes (below the recommended 30-minute default) disrupts Spanner's ability to reorganize data splits across nodes. Moreover, Spanner charges each hour for the maximum number of nodes present during that hour, so intra-hour scale-ins provide zero cost savings.The workload consisted purely of steady plateaus with small recurring peaks (where stepwise scaling is ideal), and you preserved a non-zero margin and the 30-minute scale-down cooldown alongside a direct schedule for major spikes.
Aggressive scale-in settings often backfire in distributed databases. Unlike stateless VMs or serverless containers, stateful Spanner nodes must rebalance data splits whenever capacity changes, making stability margins and longer scale-down cooldowns essential.
Answer them yourself and get your score the moment you finish. No account needed.
Full access includes
Keep the momentum going with these hand-picked practice scenarios
Last updated Validated