Score:0

Running computations >60min on Google Cloud Run

in flag

I'm looking to run computations that may execute for longer than 60 minutes on Google Cloud Run. I'm aware that this is the maximum execution time, but I was wondering if there's some way around this. I'm considering periodically sending requests to the API endpoint for the container running the computation to keep the service up, but I'm not sure if the load-balancer sitting in front of the container will actually direct it to the container running the job.

Alternatively I'm considering Fargate, but one detractor is that it's always running and I'm not sure if there's any way around this. Are there other options / configurations I should consider? Any help would be appreciated.

Score:1
cn flag

Cloud Run currently has a configurable maximum request timeout of 3,600 seconds. There is no supported method around that today.

Requests do not run in the background, so you cannot periodically ping the service to keep a task running.

Google will soon be offering Cloud Run Jobs. This is currently in preview. I do not know the release timeframe.

Cloud Run Jobs enable you to run data processing and other run-to-completion workloads in Cloud Run, with the same simple developer experience and fast startup and scale-out of Cloud Run

Note: There is a signup link for Cloud Run Jobs. I do not know if I can share the link on a forum. Sometimes preview features are by invitation only.

in flag
Unfortunately the Run Jobs also seem to be limited to 60 minutes (for now).
Score:0
me flag

As of Sept 2021

You can now use Cloud Run Always On allocation / no-cpu-throttling [1] [2].

gcloud run deploy --image IMAGE_URL --no-cpu-throttling

[1] https://cloud.google.com/blog/products/serverless/cloud-run-gets-always-on-cpu-allocation [2] https://cloud.google.com/run/docs/configuring/cpu-allocation

Score:0
dm flag

Cloud Run Jobs has added support for 24 hour deadlines (currently in preview): https://cloud.google.com/run/docs/configuring/task-timeout

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.