3 ms·
I'm new to serverless, but I've wondered what happens if: - The function get stuck and run forever? - It causes a request to loop? And you have hundreds or t
by tmikaeld 9y ago
I'm new to serverless, but I've wondered what happens if:
- The function get stuck and run forever?
- It causes a request to loop?
And you have hundreds or thousands of these "functions" deployed?
Couldn't that cause sky-high costs if it goes undetected or even unwanted DDOS against other's infrastructure?
- jccooper 9y agoSystems like this must have an extensive quota-and-limits system. It will disallow overlong runtimes or excessive memory use, and if you keep doing that will run out of quota (which is usually attached to billing.)
- slow_donkey 9y agoFor now, when adopting FaaS, you must be vigilant to adopt rigorous monitoring and alerting for how your system is behaving so that you can detect situations and correct them before they become significant problems. Of course, the complexity introduced by monitoring flies somewhat in the face of the simplicity of deploying to FaaS, which is friction that your developers must overcome. - Designing Distributed Systems by Brendan Burns
- jedberg 9y agoThe first one is easy, you just have a hard limit on runtime per invocation. The second is harder. Last I checked, AWS Lambda for example would allow a loop between two functions to run forever. You have to build loop detection into your software.
- cavisne 9y agoLambda recently added customizable concurrency limits per function which was partly to address the "function cycle" issue, ie at least your costs wont blow out too quickly. The classic example of this is a function subscribed to S3 events which in turn creates an s3 object itself :P