Service Models: IaaS, PaaS, SaaS and Serverless
Compare infrastructure, platform and software as a service, plus serverless functions, by what you manage and what the provider manages for you.
Welcome back!
Step 1 of 13Learn
Pizza four ways
A classic way to explain cloud service models is pizza. You can:
- Make it at home: buy the oven, the ingredients, make the dough, bake it, serve it. You control everything and do everything. That's running your own data center, called on-premises.
- Buy a take-and-bake pizza: someone else made it, but you use your own oven and table.
- Order delivery: you only provide the table and drinks.
- Eat at a restaurant: you just show up and eat.
Cloud service models follow the same pattern. Each step up hands more of the work to the provider and leaves you less control and less responsibility.
The layers being handed over, from the bottom up, are: the physical data center and hardware, networking and storage, virtualization (the software that splits physical machines into virtual ones), the operating system, the runtime and middleware (such as a language environment or a web server), your application code and finally your data.
The three main models are IaaS (infrastructure as a service), PaaS (platform as a service) and SaaS (software as a service). A newer fourth, serverless or functions as a service (FaaS), sits between PaaS and SaaS. Whatever the model, you always remain responsible for your own data and for who can access it.
Step 2 of 13Learn
IaaS, PaaS and SaaS
IaaS: rent the building blocks. The provider gives you virtual machines, storage and networks. You install and manage the operating system, patch it, install runtimes and deploy your app. It's the most flexible model and the closest to running your own servers, without owning hardware. Examples: virtual machines such as Amazon EC2, Azure Virtual Machines and Google Compute Engine; block storage; virtual networks.
PaaS: bring your code. The provider runs the operating system, runtime and scaling. You upload your application and configure it. You don't patch servers or install language versions. Examples: app platforms such as Azure App Service, Google App Engine, AWS Elastic Beanstalk and Heroku, and managed databases, where you get a working database without managing the server under it.
SaaS: just use the software. A complete application delivered over the internet, usually paid per user per month. You manage your users, settings and data; the provider handles everything else. Examples: Microsoft 365, Google Workspace, Salesforce, Slack, Zoom.
A quick test for which model you're looking at: ask "Do I patch the operating system?" If yes, it's IaaS. If no, but you deploy your own code, it's PaaS. If you don't deploy code at all and just log in and use it, it's SaaS.
Most organizations use all three at once: SaaS for email and office work, PaaS for new web apps, and IaaS for older systems that need full control.
Step 3 of 13Practice · Diagram
How much do you manage?
Tap the model where you manage only your data, users and settings.
Tap the shape that answers the question, then press Check.
- On-premises
Everything, down to the building and power.
- IaaS
OS, runtime, apps, data. Provider: hardware and virtualization.
- PaaS
Your code and data. Provider runs the platform.
- SaaS
Your data, users and settings only.
Step 4 of 13Compare
Who manages what
| Aspect | On-premises | IaaS | PaaS | SaaS |
|---|---|---|---|---|
| Physical hardware and data center | You | Provider | Provider | Provider |
| Virtualization and networking | You | Provider | Provider | Provider |
| Operating system and patching | You | You | Provider | Provider |
| Runtime and scaling | You | You | Provider | Provider |
| Application code | You | You | You | Provider |
| Data, users and access | You | You | You | You |
Step 5 of 13Practice · Sort into groups
Sort each service into its cloud service model.
Tap an item, then tap its group (or drag it there).
Step 6 of 13Learn
Serverless: pay per request
Serverless doesn't mean there are no servers; it means you never see or manage them. The best-known form is functions as a service (FaaS): you write a small function, such as "resize this uploaded image" or "handle this API request", and the platform runs it whenever an event triggers it. Examples include AWS Lambda, Azure Functions and Google Cloud Run functions.
Key traits:
- Event-driven. Functions run in response to something: an HTTP request, a file upload, a message in a queue, a schedule.
- Scales to zero. When nothing happens, nothing runs and you pay nothing. When 10,000 events arrive at once, the platform runs many copies in parallel.
- Billed per use, typically per request and per amount of compute time measured in milliseconds.
Trade-offs to know:
- Cold starts. If a function hasn't run recently, the first call can take extra time while the platform prepares it, from milliseconds to a few seconds.
- Time and resource limits. Functions are meant for short tasks; long-running jobs usually fit better elsewhere.
- Different design. Apps become collections of small functions and managed services, which is powerful but harder to test and debug as a whole.
Serverless fits spiky or unpredictable workloads, background tasks and event processing. A steady, always-busy service may be cheaper on regular servers or containers.
Step 7 of 13Diagram
A serverless function's life
Tap a shape with to see more.
- Event arrives
An HTTP request, an uploaded file, a queue message.
- Provider starts the function
The first start can add a short "cold start" delay.
- Your code runs
- Result returned
- Scales back to zero
No requests, no compute charge.
Step 8 of 13Practice · Choose one
An app receives no traffic at night and huge bursts when a newsletter goes out. Which model best matches "pay nothing when idle, scale instantly in bursts"?
Step 9 of 13Note
Step 10 of 13Practice · Diagram
One retailer, every model
Tap the workload that needs the most hands-on management from the retailer.
Tap the shape that answers the question, then press Check.
- Online retailer
- SaaS
- PaaS
- Serverless
- IaaS
- Email, payroll, support
- Web store + managed database
- Thumbnails, order emails
Run only when a photo is uploaded or an order is placed.
- Old inventory system
Needs a specific OS version, so it runs on VMs.
Step 11 of 13Practice · True or false
With SaaS, the provider is responsible for deciding which of your employees can access your company's data.
Step 12 of 13Practice · Fill in the blanks
Fill in the blanks
A quick test for the service model: if you must patch the operating system yourself, it is ; if you deploy your own code but the provider runs the operating system and runtime, it is ; if you only log in and use finished software, it is .
Step 13 of 13Practice · What would you do?
What would you do?
A two-person startup wants to launch a web app fast. Neither founder wants to manage servers or apply operating system patches, but they are writing their own code. Which approach fits best?
Lesson complete!