Why TTFB on Google Cloud Run/App depends significantly on domain?

244 views
Skip to first unread message

Andy S

unread,
Sep 23, 2019, 9:20:09 AM9/23/19
to Google App Engine

I have several top level domains pointing (DNS A record) to one service on Google Cloud Run/App (I've deployed the same service to both cloud products (Run/App) in order to test performance).


If I visit service though top level domains I have quite long TTFB, but if I visit service by "internal" Google Cloud domain like: myapp-123456.appspot.com (Google Cloud App) myapp-123456.a.run.app (Google Cloud Run) I have quite small TTFB, why?


TTFB on Google Cloud App domain is about 40ms and for top level domain pointing to the same instance of service about 80ms.

TTFB on Google Cloud Run domain is about 50ms and for top level domain pointing to the same instance of service about 320ms.


TTFB on Google Cloud App is about 50% of time for top level domain. TTFB on Google Cloud Run is about 16% of time for top level domain. Why?


TTFB 300ms for every request is absurd! In 300ms I could have DOM content loaded on private server.


Technical details: 

My top level domains are registered by different registrars. Difference is the same for AnyCast DNS (OVH) and standard DNS. Difference exist also for http and https pages. I've tested it manually and by scripts (chrome-har-capturer) houndrends times with headless google and on firefox. I was using median time value for, not average. There is no point of publishing here my domains because I'm testing different settings constantly.


Sample screens:

Google Cloud Run, Google Domain

Google Cloud Run, Top Level Domain

Virtual Private Server, Top Level Domain

George (Cloud Platform Support)

unread,
Sep 26, 2019, 1:07:26 PM9/26/19
to Google App Engine
Hello Andy, 

There are architectural reasons for increased TTFB in some regions. Where do you run your services, in which regions? This is a known issue, and Developers are actively working towards a fix. 

Andy S.

unread,
Jun 9, 2020, 6:33:02 PM6/9/20
to Google App Engine
Hmmmm, interesting - after several months TTFB is reduced significantly to about 80ms for top level domains on Google Cloud Run. This is what I was hoping for. Thank you!
Reply all
Reply to author
Forward
0 new messages