Live data from Hacker News

Improving API Response Times by Migrating from Cloud Functions to Cloud Run

unloc.app

1–10 of 40 posts

Re: Improving API Response Times by Migrating from Cloud Functions to Cloud Run

#2
We use Firebase for basically everything at our company ─ we run an API-first "digital keychain" ─ and we love it! however our API (based on Cloud Functions) response times were... not so great to say the least, with some of our endpoints taking more than a couple of seconds to respond, which was kind of a big issue for our clients.

We tried several techniques but by far what got us to reduce response times the most was migrating from Cloud Functions to Google Cloud Run.

Re: Improving API Response Times by Migrating from Cloud Functions to Cloud Run

#3

We use Firebase for basically everything at our company ─ we run an API-first "digital keychain" ─ and we love it! however our API (based on Cloud Functions) response times were... not so great to say the least, with some of our endpoints taking more than a couple of seconds to respond, which was kind of a big issue for our clients. We tried several techniques but by far what got us to reduce response times the most…

I’m in the process of figuring out what to use for my next startup. Have you had any issues with Firebase? If you were to start again, would you still mainly use Firebase on the client or would you have the clients hit Cloud Run endpoints?

Re: Improving API Response Times by Migrating from Cloud Functions to Cloud Run

#5
post #3

We use Firebase for basically everything at our company ─ we run an API-first "digital keychain" ─ and we love it! however our API (based on Cloud Functions) response times were... not so great to say the least, with some of our endpoints taking more than a couple of seconds to respond, which was kind of a big issue for our clients. We tried several techniques but by far what got us to reduce response times the most…

I’m in the process of figuring out what to use for my next startup. Have you had any issues with Firebase? If you were to start again, would you still mainly use Firebase on the client or would you have the clients hit Cloud Run endpoints?

Just mentioning ( I'm not sure from your question if you're aware of this or I'm misunderstanding something), Firebase is a suite of tools within GCP, and you can have Firebase things call GCP things within the same project and IAM framework without any issue.

Re: Improving API Response Times by Migrating from Cloud Functions to Cloud Run

#9
post #7

You mentioned that Cloud Run allowed you to reserve a number of always-running instances, but that feature is available for Cloud Functions as well [0]. [0] https://cloud.google.com/functions/docs/configuring/min-inst...

Hi! Author here.

Functions still only run a single request at a time, while Cloud Run can run as many as the container can handle. We want to build for multiple smaller requests, so when we get ~10k requests incoming in a short timespan it's a lot more useful to have Cloud Run.

I may be mistaken, but I believe cold start is roughly the same for both.

Re: Improving API Response Times by Migrating from Cloud Functions to Cloud Run

#10
post #8

hehe, im just going the other way for a startup of mine. Were i started with ECS (aws cloud run basically) and now going to lambda. Bot for our usecase the cold start isnt such a big deal.

If cold starts wasn't a problem we probably would have stayed with functions, and all of our non-api stuff is still on functions.
Post reply on HN