A cloud engineer needs to manage an operational Cloud Run service named `order-service` deployed in the `us-central1` region. To handle peak traffic demands while preventing runaway infrastructure costs, the engineer must update the existing service configuration so that no more than 50 container instances scale out, and each instance handles up to 80 concurrent requests. Which TWO `gcloud` CLI commands or flags can the engineer execute to correctly set these parameters? (Select TWO.)
- Run `gcloud run services update order-service --max-instances=50 --concurrency=80 --region=us-central1`.Answer
- Run `gcloud run deploy order-service --image=gcr.io/my-project/order-service:v2 --max-instances=50 --concurrency=80 --region=us-central1`.Answer
- CRun `gcloud run services update-traffic order-service --max-instances=50 --concurrency=80 --region=us-central1`.
- DRun `gcloud functions deploy order-service --max-instances=50 --concurrency=80 --region=us-central1`.
Answer
The configurations can be applied either by updating the service inline with `gcloud run services update --max-instances=50 --concurrency=80 --region=us-central1` or by deploying a container image revision with `gcloud run deploy --max-instances=50 --concurrency=80 --region=us-central1`.
Both updating an active service with `gcloud run services update` and deploying a revision using `gcloud run deploy` support setting instance scaling limits (`--max-instances`) and container concurrency (`--concurrency`). Both commands correctly apply the maximum instance ceiling to 50 and request concurrency per instance to 80.
Step-by-Step Solution
Key Concept
Cloud Run Service Configuration and Scaling Management via gcloud CLI