Should I Switch from Node.js Cloud Functions to Go on Cloud Run?

0
11
Asked By CuriousCoder37 On

I'm currently running a workload called `checkAllChecks` using Firebase Cloud Functions with Node.js for my uptime and API monitoring application (exit1.dev). The function fetches checks from Firestore, makes numerous outbound HTTP requests for APIs, websites, and SSL checks, aggregates the results, and writes the status back to the Firestore, then repeats the process. While it works, I find it feels a bit fragile, memory-intensive, and overly complicated, especially when dealing with concurrency and retries. I'm thinking about rewriting this in Go and deploying it on Cloud Run, not because Go is trendy, but because I want something simple, predictable, and cost-effective under heavy loads. I'm curious to hear from anyone who has made this move: has anyone switched from Firebase Cloud Functions to Go on Cloud Run in production? Does Cloud Run Functions make a significant difference, or is plain Cloud Run a better choice? Are there downsides when it comes to Firebase integration, authentication, or scheduling? I want to simplify things, not complicate them further. I'd love to hear your experiences and any 'war stories' you have!

4 Answers

Answered By NodeNaysayer83 On

Dumping Node.js sounds like a good change! It definitely has its pros and cons. Right now, I’d rate my experience with Node as about 50/50 in terms of good and bad outcomes.

RealistRick99 -

Haha, indeed! It really does come down to what you need from your workload!

Answered By DevDynamo45 On

Switching to Go might depend on how familiar your team is with it. If everyone knows their way around Go, it could be really advantageous. Maybe try a proof of concept and see how it performs—get a feel for how the team adapts to it and manages maintenance.

Answered By TechieTurtle12 On

Go for it! Node's concurrency model is nice until you need reliable handling of concurrent tasks, then things can get messy. Go does 'boring' really well. I would recommend Cloud Run over Cloud Functions here, as you’ll get more control and the cold start time won’t be an issue for scheduled jobs. Definitely skip Cloud Run Functions; they just seem like a way for Firebase to push more options. Just be aware that Firestore client libraries in Go can be a bit sluggish compared to Node, but honestly, since you're dealing with network calls anyway, it shouldn't be a big deal. Authentication should be straightforward too, and you can manage scheduling easily with Cloud Tasks or a Cloud Scheduler HTTP trigger.

Answered By GoGetter89 On

I think ditching Node.js is a solid move! In my experience, Cloud Run has been great and I can't see this going wrong for you. Go generally helps avoid those tricky concurrency issues you seem to be facing with Node.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.