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.
An e-commerce company operates a multi-database architecture on Google Cloud using Cloud Spanner for transactional order processing and Cloud Bigtable for real-time user session analytics. You need to define Service Level Indicators (SLIs) in Cloud Monitoring to measure database reliability against the following business requirements:
Which SLI definitions should you select?
In Cloud Monitoring, spanner.googleapis.com/api/request_latencies is a DISTRIBUTION metric that records histogram buckets of API call response times, while bigtable.googleapis.com/server/error_count and bigtable.googleapis.com/server/request_count are counter metrics tracking failed and total Bigtable server requests.
This option reverses the SLI structures and metric types required for each database engine. Applying DistributionCut to api/request_latencies measures Spanner latency, not the percentage of successful queries. Conversely, taking the TimeSeriesRatio of error_count (badServiceFilter) to request_count (totalServiceFilter) measures Bigtable availability, not whether Bigtable requests completed under 100 ms.
spanner.googleapis.com/api/request_latencies captures how long Spanner API calls take (including non-query API calls), rather than counting successful versus failed SQL queries via query_count.bigtable.googleapis.com/server/error_count and server/request_count only count whether requests succeeded or failed; they contain no timing data to evaluate a 100 ms latency threshold.DistributionCut is built exclusively for DISTRIBUTION (histogram) metrics such as latency, whereas TimeSeriesRatio is built for counting good/bad events versus total events.The business requirements were reversed—requiring you to measure Spanner API latency under a time threshold and Bigtable request availability (success versus error rate) instead.
Because databases often have different reliability requirements across workloads—or even between read and write operations—selecting the correct metric type and SLI structure (TimeSeriesRatio for availability/correctness and DistributionCut for latency) is critical for accurate SLO tracking.
A BasicSli is a predefined service-level indicator object in Cloud Monitoring that automatically measures availability or latency without requiring engineers to build custom metric filters. It is designed for managed service platforms where request and latency telemetry follow standardized conventions.
Database services such as Cloud Spanner and Cloud Bigtable are not supported as BasicService types with built-in BasicSli support. Because Cloud Monitoring does not automatically map generic availability and latency SLIs to database-specific resources like spanner_instance or bigtable_table, attempting to use a BasicSli cannot capture database query success rates or table-level latency thresholds.
BasicSli metrics are automatically available only for specific service types, including Cloud Service Mesh, Istio on Google Kubernetes Engine, and App Engine.RequestBasedSli or WindowsBasedSli definitions built on service-specific Cloud Monitoring metrics.BasicSli does not let you filter by database-specific labels such as database in Spanner or table and cluster in Bigtable.BasicSli configurations do not expose DistributionCut range filtering tailored to database server latency histograms.You were defining default availability or latency SLOs for a microservice running on App Engine or Cloud Service Mesh, where standard HTTP/gRPC metrics are automatically discovered.
For custom services, GKE workloads, and managed databases, engineers must explicitly select Other in the SLO creation workflow (or configure requestBased / windowsBased objects via the API) and specify the exact monitored resource and metric types.
GAUGE metrics record an instantaneous numeric value at a point in time, such as CPU utilization, memory usage, or current storage throughput. While valuable for capacity planning, troubleshooting bottlenecks, and infrastructure alerting, they reflect internal resource consumption rather than discrete user requests.
This approach fails for both technical and conceptual reasons. Technically, Cloud Monitoring cannot use GAUGE metrics in request-based SLIs, because request-based TimeSeriesRatio structures require DELTA or CUMULATIVE metrics that count discrete units of service. Conceptually, CPU utilization and raw throughput do not directly measure query success rates or request latency from the user's perspective.
DELTA or CUMULATIVE counters so Cloud Monitoring can sum good and total requests over a compliance window; GAUGE values cannot be summed into request ratios.You were building a Cloud Monitoring dashboard or infrastructure capacity alert to detect underprovisioned instances, or using a windows-based SLI (WindowsBasedSli) designed to evaluate whether a windowed performance threshold is met over fixed time intervals.
When selecting database SLIs, always distinguish between resource health metrics (CPU, disk IOPS, memory) used for diagnostics and service-level metrics (request success ratio, latency distribution) that directly reflect application and user experience.
In Cloud Monitoring, a request-based SLI evaluates reliability by measuring individual units of service—such as database queries or server requests—over a compliance window on an intuitive 0% to 100% scale. TimeSeriesRatio computes the ratio of good events (or bad events) to total events using counter metrics, while DistributionCut calculates the fraction of recorded values in a histogram distribution that fall within a specified numeric range.
TimeSeriesRatio (goodTotalRatio) with spanner.googleapis.com/query_count on the spanner_instance monitored resource directly measures query success. Setting totalServiceFilter for all queries to the target database label and goodServiceFilter with metric.label."status"="ok" produces the exact percentage of successful queries.DistributionCut with bigtable.googleapis.com/server/latencies on the bigtable_table monitored resource captures the histogram of request latencies. Setting the range from 0 to 100 milliseconds counts the proportion of requests meeting the 100 ms business threshold.database for Spanner; table and cluster for Bigtable) isolates reliability metrics per workload.query_count and server/latencies use DELTA or CUMULATIVE metric kinds, which are required for request-based SLIs.Unlike BasicSli, which is unavailable for database engines, or GAUGE metrics, which are incompatible with request-based ratios, pairing TimeSeriesRatio for query availability with DistributionCut for latency histograms follows the exact pattern required for data storage and retrieval services.
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