ahmetb / cloud-run-faq

Unofficial FAQ and everything you've been wondering about Google Cloud Run.
https://cloud.run
Creative Commons Attribution 4.0 International
2.32k stars 124 forks source link

Does GCP charges for cold start time? #154

Closed gerolndnr closed 3 years ago

gerolndnr commented 3 years ago

I was wondering if GCP charges for the time the container is cold starting.

ahmetb commented 3 years ago

That's a good question.

You're not charged during the duration while the infrastructure is getting warmed up.

But you are charged while your container is started (and not yet listening on the port number). So if your app is slow to start the HTTP server, you're actually charged for that period.

This is actually clear in the docs (https://cloud.google.com/run/pricing):

image

gerolndnr commented 3 years ago

Thanks for the fast answer, Ahmet!