DEV Community

Cover image for PaaS, FaaS and Serverless .. The Intro.
Ahmed Metwally
Ahmed Metwally

Posted on • Updated on

PaaS, FaaS and Serverless .. The Intro.

PaaS .. Platform as a Service.
FaaS .. Function as a Service.
Serverless .. There will be a server.

Just a Long Introduction

Let’s start with IaaS first .. yes it’s not in the title, but we should mention it .. infrastructure as a service .. simply, when your cloud provider rent you a server with pre-installed OS .. and leave you .. you are on your own .. you have to update, secure and maintain the OS and all software and runtimes you may need .. it’s now your machine .. make yourself at home .. and don’t forget to configure the firewall .. and make sure no one in your team will use this server illegally, you know, port scanning and these stuff.

If you don’t want to maintain a server, cloud provider may maintain it for you .. you just have to choose the server configurations and the runtime you need for your application .. then you just upload your app and your provider will take it from here .. set back and relax .. welcome into PaaS.

In this case provider will rent you a platform for your app .. not just a server .. it’s a server ready to host your app .. and it’s self maintained .. Server, OS and app runtime .. your will not update it or secure it or anything .. you may not have direct access to it.

In most cases you will responsible for scale .. in other cases you just do some configurations and let auto scaling work.

If you think this is not enough .. don’t worry .. they invented FaaS for you .. in FaaS you just choose the runtime for your app .. and maybe desired memory size .. and nothing else. It doesn’t require scaling in FaaS.

Actually, if you ask me, I’ll say that Fass is just another form of Pass .. but, we love to give fancy names to each new version or modification of same thing .. actually, from my point of view, I found that term FaaS is misleading .. since the function which is as a service, is you own function! .. I mean platform as a service is the provider platform .. provider setup it for you .. but the function .. it’s your function .. you will create it and upload it to a platform .. anyway, it’s just an opinion .. ignore it.

So, what is the difference? .. the difference between PaaS and FaaS is the function is not running until someone call it .. while in PaaS, your app is should be always running .. and you the one who will run it .. in FaaS, you just upload the function .. and let the provider run it and shut it down for you.

FaaS is not idle app waiting for calling .. it’s not a running app .. when someone call it, a new instance of the app .. or the function .. will be created and handle the request and shutdown.
OK, I am lying .. sometimes, there are some containers are running for your function ready to handle the requests .. but this is not granted .. it's just .. sometimes .. not all the times.

That’s mean, it’s not one instance serve all requests .. that’s mean there is no need for scale configurations .. that’s mean, it almost can handle any traffic load without concerning about hardware resources like memory or CPU .. it’s instance per request .. only this instance should start with sufficient amount of memory to handle one request.

That’s mean, if one instance fail for any reason, the others will not .. back to PaaS, you need to handle app crashing .. and make it self healing or auto restart .. in function, no need for this.

Another important difference between PaaS and FaaS .. FaaS is only one function .. one single API .. it’s not a complete app full or APIs .. and doing many things .. it’s only one function doing only one thing with only single entry .. and it’s stateless by nature.
OK, I am lying again .. some folks did workaround to add more APIs in one function .. but .. this is workaround .. we are not design our solutions based on workaround! .. Ok, we do workaround .. but not by design .. we just come up with it in the emergency situations. OK, enough .. FaaS is only one function .. period

I don’t know why people link serverless with only AWS Lambda .. all articles across the globe that talking about serverless says Lambda is serverless .. OK .. it’s right .. Lambda is serverless .. but it’s not Lambda alone.

Why they didn’t say that when DynamoDB launched !! .. DynamoDB is serverless too .. AWS API gateway is serverless .. S3 is serverless .. and it been around for about 15 years.

I’m pretty sure that you know that serverless doesn’t mean there is no server! .. it does mean that the server is not your concern .. not your business .. don’t ask about it .. like in DynamoDB service .. you just create a new table and configure its read and write capacity .. then everything is just working .. do you feel that there is a server in this process? .. sure there is a server .. a plenty of them .. but not in your sight .. do you know the configurations of these servers that run DynamoDB? .. do you know the OS version ? .. even if you know .. did you choose any of them? Have a control on them?.. absolutely No you did not .. this the simple meaning of serverless.

So, when you can call you app is serverless? .. yes, that’s right .. when you are not involved in servers configurations.

We can continue talking forever .. but I think this is enough as an introduction.

Top comments (0)