DEV Community

Discussion on: A Smart Service to Keep AWS Lambda Warm

Collapse
 
byrro profile image
Renato Byrro • Edited

Hi Tony, in terms of time-series modeling, we would have a standard deviation and an interval of confidence.

Let's say the predicted value is 10 containers and the standard deviation (SD) is 1. If the data follows a normal distribution, we can assume with 99% of confidence that the real number of containers needed will fall between 2.5 SDs below or above the predicted value.

Thus, raising the prediction to 13 (10 + 2.5 = 12.5 > rounded to 13) should give us 99% confidence in the prediction.

Of course, we can't expect invocation histories to follow a normal distribution, so we need to test which distribution it more closely matches in order to adjust the confidence interval appropriately.