Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The Google Cloud Functions are not really good compared to CloudFlare Workers :/ The GCF are regioned, slow to start and behaving like an on-demand temporary cloud instance, than an actual FaaS offering.


Using golang cloud functions. I have a constant stream of hits, so there are always available functions.

Connecting to cloud sql postgres and serving a request that hits the database takes under 1s. Hot request/responses are ~20ms.

My hits are all US based, so I plopped myself into Central. No issues there either.


> Using golang cloud functions. I have a constant stream of hits, so there are always available functions.

There is no way to avoid cold starts althogether, there will always be tail latencies unless there is a generous amount of idle instances running that GCP charges for.

> under 1s. Hot request/responses are ~20ms.

Those numbers are great, I think Go plays a huge part in this. Google's Node.js firestore SDK is terrible... I've had 15 second cold starts, which is unacceptable for client-facing functions, there's a whole thread about it here [1]. GCP doesn't have a very wide range of language SDK support for those that don't want to use Go or Node.js...

> My hits are all US based

Edge compute, like Fly.io or Cloudflare Workers truly shines when you need to serve traffic close to the user around the world. Otherwise normal region-locked functions are fine. Vercel requires you to choose a single region, and it's locked to US-east for free-tier users. For us Europeans over here, SSR has to effectively cross the Atlantic ocean.

[1]: https://issuetracker.google.com/issues/158014637


> Google's Node.js firestore SDK is terrible

I don't think it is terrible, but I do agree it is a slower startup than golang by a lot. Which is why I went with golang for this project and I stopped using firebase entirely. You really don't want to effectively be parsing all your source code every time a launch happens.

> Edge compute, like Fly.io or Cloudflare Workers truly shines when you need to serve traffic close to the user around the world.

For my app, it is really just about having another layer of control in front of my API calls. I don't care so much about the CDN aspects.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: