Encountering High Latency in Google Cloud Run

Hello team,

we are currently using Google Cloud Run to deploy a messaging bot which sends a message to everyone in our company in Microsoft Teams. However doing this over Google Cloud Run leads to severe performance issues regarding its high latency. In our testcase when sending a message to 7 people, each request will need around 10s - 30s to be send with a whole duration time of 51s. If the bot is deployed locally, it only needs 300-500ms per request with a whole duration time of 3,3s.

To not overload Teams each request is set to be send with a 100ms delay. But over Cloud Run the delay time between messages is much higher than 100ms peaking 7s. Does anyone has an idea where the problem might be? This is how i set up my Cloud Run Instance. The Bot is written in Typescript.

    gcloud run deploy <bot> 
    --image=<bot-image>
    --region=europe-west3
    --project=<my-project> 
    --no-allow-unauthenticated 
    --cpu=1 
    --memory=256Mi 
    --port=80
    --env-vars-file=$ENVFILE

Here are the tracings of the requests send. The first one deployed over Google Cloud Run and the second one deployed locallly.

Try increasing the compute of the machine and then test.

Also, check this doc of CR Known Issues.

https://cloud.google.com/run/docs/issues

Hi @lem , what tool is this to generate this tracert and graph?