6 ms·
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] h
by xatlasm 5y ago
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-instances https://cloud.google.com/functions/docs/configuring/min-inst...
- obcilion 5y agoHi! 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.
- deleted 5y ago[deleted]
- obcilion 5y agoThanks for letting me know :) Definitely not on the same IP, but I sent an email nonetheless.
- joek1301 5y agoObviously switching away from Cloud Functions does away with the architectural limitation of processing requests serially, but from my (limited) understanding of Node.js internals, Express applications are single-threaded anyway. Do you have any idea of where your performance gains are coming from? Is there a lot of async, non-blocking waiting happening in the process of fulfilling requests against your API?
- obcilion 5y agoThe NodeJS application is single-threaded, but the Node EventLoop can handle a huge amount of parallel requests, especially since most of the time per request is spent waiting for calls to the DB or external APIs. I believe the majority of our performance gain is from having far fewer cold starts during large traffic loads.