An operations team needs to adjust execution limits for a production Cloud Run service named `inventory-api` running in the `us-central1` region to prevent connection starvation on a backend database. The service must be constrained to handle a maximum of 80 concurrent requests per container instance and cap overall scaling at 20 concurrent container instances, while still allowing the service to scale down to zero when idle. Which `gcloud` command correctly configures these operational limits?
- gcloud run services update inventory-api --concurrency=80 --max-instances=20 --region=us-central1Answer
- Bgcloud functions deploy inventory-api --concurrency=80 --max-instances=20 --region=us-central1
- Cgcloud run services update inventory-api --max-concurrency=80 --max-replicas=20 --region=us-central1
- Dgcloud run services update inventory-api --concurrency=80 --min-instances=20 --region=us-central1
Answer
The command 'gcloud run services update inventory-api --concurrency=80 --max-instances=20 --region=us-central1' correctly updates the service configuration.
The correct command uses 'gcloud run services update' with the '--concurrency=80' flag to restrict simultaneous requests per container and '--max-instances=20' to prevent autoscaling beyond 20 total container instances.
Step-by-Step Solution
Key Concept
Cloud Run Autoscaling and Concurrency Configuration
Estimated Time:2m 0s