Re:Building a high-scale chat server on Cloud Run
by gt50201 on Tuesday March 09, 2021 @10:55PM
(#26407572)
How do you differentiate background and worker processes? Iām currently running VMs for background processes processing pub sub topics. Is that not something that could go on cloud run?
[ Parent
| on HN ]
Re:Building a high-scale chat server on Cloud Run
by spyspy on Tuesday March 09, 2021 @11:03PM
(#26407616)
When an instance isn't handling a request it either gets killed almost immediately, or if even if you have min idle instances configured, its CPU get's throttled to nothing. So you can't have goroutines or some such doing anything outside of the request context. It's my team's one gripe with Cloud Run. It'd be great to have an option for long-lived instances.
Re:Building a high-scale chat server on Cloud Run
by andrewdb on Wednesday March 10, 2021 @01:07AM
(#26408306)
You can set minimum instances now ( well - currently Preview). https://cloud.google.com/run/docs/configuring/min-instances
Re:Building a high-scale chat server on Cloud Run
by spyspy on Wednesday March 10, 2021 @01:58AM
(#26408613)
Like I said, even if the instance is "alive", if it's not currently handling a request it's CPU is throttled to nothing so you can't trust any background process will finish its work.
Re:Building a high-scale chat server on Cloud Run
by wietsevenema on Wednesday March 10, 2021 @02:48PM
(#26415322)
You can use an HTTP push subscription to an IAM protected Cloud Run service.