[0]: https://iplayer.engineering/evaluating-tensorflow-models-in-...
[0]: https://iplayer.engineering/evaluating-tensorflow-models-in-...
> Because we run 200 invocations or so in parallel we’ll only need to download the model once and save it there
From my own reading of the Lambda docs, it seems that a simultaneous request for the same Lambda may or may not spin up a new container, ie while serial requests within the 15 minute timeout will likely reuse the same instance with the same frozen/cached tmp data, parallel requests do not have that assumption.
Was this your finding in practice? If so, were your CloudWatch “keep warm” events a series of just 1 Lambda invocation ~10/15min apart of 200 simultaneous requests serially spaced to keep the instances spun up?
This is true. I learned this a hard way some time ago while trying to understand why our lambda function crashes from time to time. It turned out we didn't clean the /tmp folder and we used the space quite extensively. There's a good article on this:
https://aws.amazon.com/blogs/compute/container-reuse-in-lamb...
I do not remember having had issues with it, but honestly, I don't think I actually have stats on that anymore.
I've just checked in S3, but it doesn't look like we have request or data transfer metrics enabled on the model bucket. I may enable those next week to monitor the effectiveness of our strategy better.
Good luck!