zappa / Zappa

Serverless Python
https://zappa.ws/zappa
MIT License
3.24k stars 362 forks source link

[Migrated] Keep Warm should Default to 15 Minute Intervals #344

Closed jneves closed 4 months ago

jneves commented 3 years ago

Originally from: https://github.com/Miserlou/Zappa/issues/858 by mcrowson

Based on reading this article, it looks like we only need the keep_warm event once every 15 minutes.

Related #851

monkut commented 2 years ago

Is there any validity to this... it would be beneficial cost wise. I think the default now is 4 mins. Can we extend it and still get a keep-warm effect?

souravjamwal77 commented 2 years ago

Hi @monkut we can increase the keep_warm time interval to 15 mins. I found some answers (links below) mainly AWS keeps lambdas warm from 5-45 mins (some say it's 5-15 mins and as per others it's 30-45 mins). So, if we keep the lambdas warm callback function to 15 mins, we would save around 2/3 of the cost of maintaining the lambdas warm.

Basically, it costs around $7-$10 to keep the lambdas warm with a 4 mins callback if we make the default callback time to 15 mins we would be saving more than 2/3 of the costs.

Source 1 Source 2

monkut commented 2 years ago

I have applications that are dependent on the function being 'warm'.

We need to do some testing (across regions?) to confirm response times with/without keep warm at various times.

souravjamwal77 commented 1 year ago

Hi @monkut I will perform the tests across regions and will submit the results here.

monkut commented 1 year ago

I have questions about how effective the keep_warm function is, however, this issue is only about changing the existing keep_warm value from the current 4 minutes to a more appropriate value.

If tests show that we can increase the keep_warm value and maintain it's current effectiveness (compareable to 4 minutes) then we should have a PR update the value.

github-actions[bot] commented 5 months ago

Hi there! Unfortunately, this Issue has not seen any activity for at least 90 days. If the Issue is still relevant to the latest version of Zappa, please comment within the next 10 days if you wish to keep it open. Otherwise, it will be automatically closed.

github-actions[bot] commented 4 months ago

Hi there! Unfortunately, this Issue was automatically closed as it had not seen any activity in at least 100 days. If the Issue is still relevant to the latest version of Zappa, please open a new Issue.