简体   繁体   中英

How can I check how many instances of a Google Cloud Run container are running?

Google Cloud Run lets me set a concurrency for a given container, which is how many concurrent requests it will service before a new container is spun up.

How do I actually check how many containers are running at any given time? The web interface mentions which services are running but not how many of them there are, and the same is true when I do gcloud beta run services (list|describe) .

Cloud Run reports the number of container instances in Cloud Monitoring

The Billable instance time metric counts how many instance time you are charged for. For example, if a Revision with 2 container instances has been continuously serving traffic in the last minute, the value is 2s/s.

Alternatively, you can export your logs to BigQuery . Each log entry has an instance ID as label (see docs ) that you can group by and count.

For a more direct metric of the number of Cloud Run instances I propose using the

run.googleapis.com/container/instance_count

endpoint of the monitoring API .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM