The advantage and disadvantage of lambda is that it decouples your economics from AWS's (or Azure's or GCP's) economics.
That is, the cost of idle time is shifted from your account to their account. This sets up a bit of a race: Amazon's goal is to have as few hidden warm instances for as little time as possible. The user's goal is to have as many hidden warm instances as possible for as long as possible.
This is where you start to see pinging to provoke AWS into keeping a warm copy. As time goes on they will have a growing incentive to prevent tricks like these from working.
At the moment, on the economics, hosted FaaSes will always have this tension. Self-hosted FaaSes open up the possibility of setting your own policy for trading latency against idle cost.
Disclosure: I am part of a team working on Project Riff, a FaaS.
> Self-hosted FaaSes open up the possibility of setting your own policy for trading latency against idle cost
if you already have a K8s cluster it's probably cheaper to just create your application regulary and use it like that.
No need to use a FaaS which complicates your whole setup for no additional benefit.
Self-hosted isn't free either. You're still paying for resources when they're idle. The difference is that you can decide on whether to scale down to 1 or not.
As it happens Riff and most other FaaS projects are built on kubernetes.
I think we have different meanings of "idle". There's idle in the sense of "this resource is reserved but not in use" and idle in the sense of "this resource is not reserved and can be used elsewhere".
Most folk want cold starts for economic reasons and warm starts for performance reasons. In a hosted setting you can't truly set your policy, you can only try to encourage by external stimuli.
That is, the cost of idle time is shifted from your account to their account. This sets up a bit of a race: Amazon's goal is to have as few hidden warm instances for as little time as possible. The user's goal is to have as many hidden warm instances as possible for as long as possible.
This is where you start to see pinging to provoke AWS into keeping a warm copy. As time goes on they will have a growing incentive to prevent tricks like these from working.
At the moment, on the economics, hosted FaaSes will always have this tension. Self-hosted FaaSes open up the possibility of setting your own policy for trading latency against idle cost.
Disclosure: I am part of a team working on Project Riff, a FaaS.