A Cloud Run service named orders-api experiences morning cold-start latency spikes. The team wants at least one container instance to stay warm at all times but must also cap the service at five instances to avoid exhausting a licensed backend. Which gcloud command correctly configures both requirements on the existing revision?
gcloud run services update orders-api --platform managed --min-instances=1 --max-instances=5
gcloud run services update orders-api --platform managed --concurrency=1 --max-instances=5
gcloud run deploy orders-api --platform managed --min-scale=1 --max-scale=5
Leave autoscaling defaults and schedule a Cloud Scheduler job to ping the service every minute to keep it warm
The --min-instances flag tells Cloud Run to keep the specified number of container instances running continuously, eliminating cold starts. The --max-instances flag limits how many instances the service can create when load increases. The gcloud run services update command accepts both flags for fully managed Cloud Run. Using --min-instances=1 and --max-instances=5 meets the requirement. Setting concurrency does not guarantee a warm instance, the --min-scale/--max-scale flags apply to Cloud Run for Anthos YAML, and relying on synthetic traffic from Cloud Scheduler does not cap instance count or provide an official guarantee.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What does the --min-instances flag do in Cloud Run?
Open an interactive chat with Bash
How does the --max-instances flag work in Cloud Run?
Open an interactive chat with Bash
Why doesn't setting concurrency guarantee a warm instance in Cloud Run?
Open an interactive chat with Bash
What are cold starts in Cloud Run?
Open an interactive chat with Bash
What is the difference between the --min-instances flag and the --min-scale flag in Cloud Run?
Open an interactive chat with Bash
Why isn't using a Cloud Scheduler job to ping the service a reliable solution to avoid cold starts?
Open an interactive chat with Bash
GCP Associate Cloud Engineer
Ensuring successful operation of a cloud solution
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
Pass with Confidence.
IT & Cybersecurity Package
You have hit the limits of our free tier, become a Premium Member today for unlimited access.
Military, Healthcare worker, Gov. employee or Teacher? See if you qualify for a Community Discount.
Monthly
$19.99 $11.99
$11.99/mo
Billed monthly, Cancel any time.
$19.99 after promotion ends
3 Month Pass
$44.99 $26.99
$8.99/mo
One time purchase of $26.99, Does not auto-renew.
$44.99 after promotion ends
Save $18!
MOST POPULAR
Annual Pass
$119.99 $71.99
$5.99/mo
One time purchase of $71.99, Does not auto-renew.
$119.99 after promotion ends
Save $48!
BEST DEAL
Lifetime Pass
$189.99 $113.99
One time purchase, Good for life.
Save $76!
What You Get
All IT & Cybersecurity Package plans include the following perks and exams .