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

by user1660210   Last Updated September 21, 2019 00:00 AM

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.

Screens:

Google Cloud Run, Google Domain

Google Cloud Run, Top Level Domain

Virtual Private Server, Top Level Domain



Related Questions


Updated May 01, 2015 00:00 AM

Updated February 24, 2017 09:00 AM

Updated February 27, 2017 16:00 PM

Updated February 08, 2019 08:00 AM