You've just cherry-picked a generic industry description of FaaS functions.
"Executes within a few seconds as a rule" - otherwise you're not really building an event-driven API, but something else. You can run the code for however long you like and even invoke via async.
Left pad adds whitespace to a string? Don't see the connection
I don't know. I don't think I cherry-picked. The concept sounded ridiculous to me, so I asked for clarification. The article provided for me (which was supposed to introduce the concept to people who haven't heard of it) only seemed to confirm my suspicions.
I _must_ be missing something. I mean I probably will still think the idea is unsound, but at least I want to really understand the thinking behind it better before I solidify my negative impression.
Probably if the function execution time is too small, the overhead isn't worth it? And if it's too large, there's too little granularity? I guess it's the same ideas that guide "ordinary" programming styles, only adjusted to the timings of large networks (milliseconds instead of microseconds).
For example:
> A serverless function is a small, discrete and reusable chunk of code that:
> ... > executes in a few seconds ..
Why would you want a function execution to take several seconds?
I must be missing something ..
[0]: http://left-pad.io/