Developers September 29, 2020

What Do You Think About Functions-As-A-Service?

Raymond Carl @raymondcarl

Anyone here use them much?

AWS - Lambda
Google Cloud - Google Cloud Functions
IBM Cloud / OpenWhisk

The thing that scares me about them is the possibility of unlimited charges if you get DDOS’ed in some cases or in others have an infinite loop for some reason. I think you also have to work around latency in some cases, so I wonder if others reserve their use for backend services.

  1. 2

    Yes. I currently have 2 SaaS products in production running on AWS Lambda and DynamoDB. AWS lets you set limits for your monthly charges and also there's AWS WAF (Firewall) and Shield (DDoS protection). The latency is not that bad but it depends on the technology stack you're using. For example the startup time of a Java app is slower than that of a Nodejs app or a Python app in most real-world use cases.
    And, yes, you should be careful in your code especially if you're invoking another Lambda programmatically using the SDK.

  2. 2

    If you want play around with FaaS I can recommend Cloudflare Workers.
    They have even a free plan, where you don't have to worry about causing costs.

    The disadvantage of Cloudflare is that you don't have that many managed services there. (S3-Storage, DynamoDb and so on).

    In my humble opinion, and what i have seen, the most costs will not produced by FaaS, instead of other managed services.

    1. 1

      But on Cloudflare’s workers, it’s only for javascript and you can’t put your backend code there, right? I had read about it a while ago, but I assumed it was a place to host your front-end javascript code / libraries or ones that you use externally..

      1. 2

        I think you confuse that with cdnjs, which is also from cloudflare.
        Cloudflare Workers support C++, C, Rust and JS.

        1. 1

          Yeah, you’re right. I didn’t know about this. I’m going to check into it. Have you had any latency problems with them? Number of free requests looks pretty good.

          1. 1

            They are really fast, but i got some problems, if the workload is to big. Then the worker runs in a timeout.
            Thats why I changed from a freeplan to the 5$ plan.

            But with the 5$ plan you get the same 'problems' as with aws:
            Unlimited Charge

            1. 1

              That’s one thing I don’t get. If you set a max number of instances of say 3, I don’t understand why your charges should ever be more than the cost of 1 VM running continuously. It’s almost like the freemium model where they want people to sign up for the free plan and they’ll make all their money off the whales.

Recommended Posts