PaaS vs Serverless
If the fundamental trick of distributed systems is getting rid of state, and both PaaS and Serverless are based on this trick, then why is Serverless different from PaaS? They both have the same basic idea, but Serverless addresses a set of use cases that PaaS does not: small event-driven functions.
It turns out Serverless is not actually just Serverless. Serverless is Serverless (you don’t see or care about servers, the platform manages that), it’s Containerless (forget about containers and packaging too), it’s Orchestratorless (you don’t need to think about how to scale your functions or make the system fault-tolerant) and it’s also App-less (you don’t need to push the whole app, you push functions and tell the system how to knit them together).
PaaS is Serverless, it’s Containerless, it’s Orchestratorless, but it’s not App-less. PaaS says “Push your app, we’ll do the rest. But push your app”.
PaaS and Serverless differ in another way: triggers. In PaaS we have stateless code which we can invoke and scale up and down in response to requests to a shared routing tier. In Serverless, we have stateless code which we can invoke and scale up and down in response to events on a shared message fabric. In both cases, it’s stateless code and a shared platform, and in both cases, the persistent stuff (aka the hard bit!) happens in services available to the code. In Cloud Foundry’s case, this would be the various services available in the huge service marketplace provided by most Cloud Foundry implementations.
Comparing FaaS vs PaaS
Platform-as-a-Service greatly simplifies deploying applications. It allows us to deploy our app and the “cloud” worries about how to deploy the servers to run it. Most PaaS hosting options can even auto-scale the number of servers to handle workloads and save you money during times of low usage.
PaaS offerings like Azure App Services, AWS Elastic Beanstalk, and others, make it easy to deploy an entire application. They handle provisioning servers and deploying your application to the servers.
Function-as-a-Service (FaaS) provides the ability to deploy what is essentially a single function, or part of an application. FaaS is designed to potentially be a serverless architecture. Although, some providers, like Azure, also allow you to dedicate resources to a Function App.
When deployed as PaaS, an application is typically running on at least one server at all times. With FaaS, it may not be running at all until the function needs to be executed. It starts the function within a few milliseconds and then shuts it down.
Both provide the ability to easily deploy an application and scale it, without having to provision or configure servers.
Feel free to contact E-SPIN for server less PaaS infrastructure, availability monitoring and security management.