We have an application with low latency requirements. Expectation is to have a response time between 2 to 10 milli seconds per HTTPS request.
Load Balancer + Instance Group : 2 milli seconds
When the application is deployed in an instance group with a HTTPS Load balancer as front end, we are getting 2 milli second response time.
Cloud Run service : 20 milli seconds
However when we deploy the same container in a Cloud Run service, the response time shoots up to 20 milli seconds. CPU was always allocated with minimum 1 instance to avoid warm up issues. Second generation execution environment.
Actually we were expecting on-par or better performance in Cloud Run due to the self managed Load Balancer and Service integration. However the latency is very high when compared to the instance group approach.
Is there a way I can further reduce the latency in the Cloud Run service ?
Please note in both tests, the client machine (from where the HTTPS requests made) was kept in us-west1 where my Regional Load Balancer and Instance Group also reside. I can provide any additional information if required.