doron grinstein
doron grinstein

Reputation: 11

Can Cloud Run respond in less than 200ms?

Cloud Run seems to respond in over 400ms. even on repeated calls (I assume 'warmed up' containers).

I deployed a simple node.js service (see code below) that responds with a static JSON.

The service endpoint does not require user authentication. I am calling us-central1 (from Ventura County, CA. USA)

I call the service and get latency of above 400ms. Sometimes I see latency in the 5000-6000 ms. range!

I understand Cloud Run is in beta, but I'd appreciate feedback from Google on what I should expect for performance and approx. when. Also, if I am configuring something wrong, let me know. If you have better results than me - please let me know what you are doing differently.

Service I deployed: https://github.com/dorongrinstein/cloudrun-dummy-service

Test code: https://github.com/dorongrinstein/cloudrun-test

I expect the output to be in the double digit ms. range. I get an output that is in the mid 3-digit range.

FYI - I am in Ventura County, CA. My internet connection is fine. I used gcpping.com and my median latency to us-central1 is 70ms.

Upvotes: 0

Views: 1383

Answers (2)

Steren
Steren

Reputation: 7919

Yes Cloud Run can respond in less than 200ms.

You seemed to be hitting a bug in our networking infrastructure, which should now be fixed.

Upvotes: 4

Aleksi
Aleksi

Reputation: 5026

According to this Cloud Run engineer, you should expect similar cold start times in Cloud Run as in Cloud Functions.

One thing you could try is raising your containers' memory limit. At least in Cloud Functions startup latency has been found to depend highly on memory allocation.

Upvotes: 0

Related Questions