This repository was archived by the owner on Oct 22, 2024. It is now read-only.
Is the API restarted on every request? #117
|
I make a request to my API, and for every single request, the micro seems to be starting up with the opening Uvicorn logs. My question is, every time I make a REST API request to my Deta Space Micro, does it run the micro from scratch every single time? |
Answered by
SlumberDemon
Jun 14, 2023
Replies: 1 comment 2 replies
|
Yes, A space app only stays alive for 20s which is its timeout and after that timeout it gets destroyed, this is on a request based system so this only happens when a request is made to that endpoint. This is because deta is a serverless platform. More on serverless platforms can be found here
|
2 replies
Answer selected by
s4m-mo
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yes, A space app only stays alive for 20s which is its timeout and after that timeout it gets destroyed, this is on a request based system so this only happens when a request is made to that endpoint. This is because deta is a serverless platform.
More on serverless platforms can be found here