You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Performance] Cold start delay on first API request #12
What happened:
When the app has not been used for a while,
the first API request (login or loading todos)
takes 3-5 seconds longer than normal.
Root cause:
Google Cloud Run is set to min-instances=0.
This means the container shuts down when idle.
When a request comes in, Cloud Run must
start the container first (called "cold start").
This adds 3-5 seconds to the first request.
Expected behavior:
API should always respond within 500ms.
Solutions:
Option 1 (Recommended for production):
Set min-instances=1 in Cloud Run.
Command:
gcloud run services update todo-backend
--region=asia-south1 --min-instances=1
Cost: approximately $5-10/month
Option 2 (Free solution):
Add a warmup ping from frontend.
When frontend loads, immediately call /health
to wake up the backend before user tries to login.
Activity
suryaff733 commentedon Oct 14, 2026
Hi @niat-web, I am working on this.
Approach:
/healthwarmup ping when the app loads to eliminate cold start before user interaction.--min-instances=1for production.Will submit a PR shortly
anandmahadevv commentedon Dec 1, 2026
Working on this issue.