Prepare and test your skills
Prepare and test your skills
Free sample question, answered and explained below. The Professional Cloud DevOps Engineer practice bank has 1,455 more like it. Try 10 free: instant score, no account.
An SRE team manages a latency-critical e-commerce checkout API deployed on Google Cloud Run. The API experiences unpredictable, spiky traffic patterns throughout the day.
During traffic surges, the service frequently breaches its 99th percentile (P99) latency Service Level Objective (SLO) due to cold-start overhead when new container instances spin up. Performance profiling shows that each container instance is thread-safe and can handle up to 40 concurrent requests without performance degradation.
You need to optimize the Cloud Run autoscaling configuration to eliminate cold-start latency for baseline traffic and handle rapid bursts efficiently, while minimizing infrastructure costs.
Which configuration should you apply to the Cloud Run service?
--min-instances), tune container concurrency (--concurrency=40), and enable request-based CPU allocation (--cpu-throttling).This configuration combines Cloud Run minimum instances (--min-instances), optimized container concurrency (--concurrency), and request-based CPU allocation (CPU throttling enabled) to create an elastic, cost-optimized, and low-latency serverless architecture.
--min-instances maintains a pre-warmed pool of ready container instances. Incoming baseline requests are routed directly to these initialized instances without waiting for container startup, runtime bootstrapping, or health checks.--concurrency=40 configures each instance to multiplex up to 40 simultaneous requests. During a sudden traffic surge, existing warm instances absorb the initial influx of concurrent requests immediately before Cloud Run needs to scale out additional instances.--cpu-throttling), CPU is allocated and billed at full rate only during request execution. Idle minimum instances that are not actively processing requests are billed at a substantially discounted idle rate, avoiding the full compute costs of continuously running dedicated infrastructure.--max-instances threshold when incoming demand exceeds aggregate concurrency capacity.This approach directly targets the root causes of P99 SLO breaches—cold starts and aggressive single-request instance thrashing—while leveraging Cloud Run's discounted idle tier to protect the organization's cloud budget.
--concurrency=1), set minimum instances to zero (--min-instances=0), and configure always-allocated CPU (--no-cpu-throttling).This setting forces Cloud Run into a strict single-concurrency mode where each instance processes only one request at a time, scales completely down to zero when idle, and keeps CPU continuously allocated whenever an instance is running.
--min-instances=0 allows the service to scale down completely during idle periods. Any subsequent request immediately incurs full cold-start latency to initialize a container.--no-cpu-throttling bills running instances at full compute rates around the clock regardless of request activity.This configuration would be appropriate for heavy, non-thread-safe workloads (such as legacy single-threaded C++ binaries or intensive machine learning inference) that require uninterrupted background processing and experience predictable, non-bursty traffic without strict low-latency SLOs.
--min-instances=N, --max-instances=N) and configure always-allocated CPU (--no-cpu-throttling).This configuration disables dynamic request-driven autoscaling by pinning the minimum and maximum instance count to an identical static number and configuring CPU to remain active and billed continuously.
This architecture would be suitable for enterprise workloads requiring constant background daemon execution, continuous WebSocket connections, or steady, predictable 24/7 compute loads where traffic never drops and serverless billing models offer no financial benefit over dedicated reservations.
--concurrency=1000), keep minimum instances at zero (--min-instances=0), and enable request-based CPU allocation (--cpu-throttling).This setting pushes Cloud Run concurrency to its maximum allowed limit (1000 concurrent requests per instance), allows the service to scale down to zero instances when idle, and throttles CPU outside of active request processing.
--min-instances=0, periods of low traffic cause all instances to shut down. New requests arriving after an idle window experience cold-start initialization delays.This approach would be appropriate for extremely lightweight, asynchronous I/O-bound proxy microservices (such as basic HTTP redirectors or reverse proxies) with virtually zero container startup overhead and negligible memory/CPU footprints per request.
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