Open frombrest opened 8 months ago
Can you elaborate more on warmup requests? From reading it seems like it's used to perform some initialization on the app site. When appengine launches a new instance of our site - it can send us a warm up request and we perform caching/initialization specific to our app. Do we have stuff that requires initialization?
Ah, I see. min_instances
require warmup request handling. Even if warmup requests does nothing I guess? I don't really understand that requirement but sure, we can implement it.
Besides of requirement in scaling policies, we can prewarm our data.json
endpoint cache and by this way prepare db connection which I hope we will be able to re-use by persistent-connections feature from django
Even if warmup requests does nothing I guess? I don't really understand that requirement but sure, we can implement it.
I think they use it like a kind of watchdog to be sure VM will not suspended/terminated
In order to improve customer experience and minimize risk of high expenses there is an idea to adjust scaling policies to have: https://cloud.google.com/appengine/docs/standard/reference/app-yaml?tab=python#scaling_elements
To apply these settings GCP recommends implement warmup requests: https://cloud.google.com/appengine/docs/standard/configuring-warmup-requests?tab=python
In addition to that, setting up persistent connections in Django to have db connections ready to serve customer requests: https://docs.djangoproject.com/en/5.0/ref/databases/#persistent-connections And persistent connection healthcheck: https://docs.djangoproject.com/en/5.0/ref/settings/#conn-health-checks