Search code examples
reactjsgoogle-cloud-platformgoogle-cloud-runsurveyjs

ReactJS App deployed on Google Cloud Run, takes around 20 seconds to load


My reactJS app is simple app which contains embedded SurveyJS widget. Deployed on Google Cloud Run, and it takes 20 seconds to load first time, subsequent access is faster.

How to troubleshoot, not sure it is Google Cloud Run config issue, or my docker file issue. Appreciate your inputs.

Thanks,


Solution

  • Please note that these 20 seconds can due to the Cloud Run Cold-start.

    The first time that a Cloud Run instance starts running requires downloading the container image and starting the container. This time is called “cold start”. The opposite is “warm start” which means that the container is already running waiting for or already processing requests.

    Please have a look into the following Cloud Run Official Documentation in order to minimize the cold-start. Also please have a look into the following external tutorials , 3 which explains regarding the cold-start and possible ways to minimze it.