Sub topic 13
Comparing the Three Models Side by Side
This chapter assumes you know what a server, an operating system, and an application are. It also assumes you have read the earlier chapters on the technology stack, the three service models, and shared responsibility. Here you put IaaS, PaaS, and SaaS next to each other and compare them on control, effort, flexibility, and cost.
The one rule behind every difference
Each model moves the line between what the provider manages and what you manage. Moving the line up the stack gives you less work and less control. Every other difference follows from that.
The comparison table
| Question | IaaS | PaaS | SaaS |
|---|---|---|---|
| What you get | Virtual machines, storage, networks | A managed place to run your code | A finished application |
| You manage | OS, runtime, app, data | App code and data | Your settings, users, and data |
| Control | High | Medium | Low |
| Setup effort | High | Medium | Low |
| Flexibility | Run almost anything | Limited to supported runtimes | Limited to the product's features |
| Typical cost basis | Per hour or second of capacity | Per instance or per usage | Per user per month |
| Example | Amazon EC2 | AWS Elastic Beanstalk | A hosted CRM or email service |
How the same task looks in each model
Suppose you need to serve a small web page. The earlier examples show the difference in the work you do.
On IaaS you pick the machine, then you must install and patch everything on it.
aws ec2 run-instances \
--image-id ami-0123456789abcdef0 \
--instance-type t3.micro \
--count 1On PaaS you hand over only the application code.
from flask import Flask
application = Flask(__name__)
@application.route("/")
def index():
return "Hello from a PaaS-hosted app"On SaaS you write no server code at all. You call the finished product.
curl -H "Authorization: Bearer $API_TOKEN" \
https://api.example.com/v1/contactsReading the trade-offs
- Control versus effort. IaaS lets you tune the kernel or install any software, and you pay for that with patching, scaling, and monitoring work. SaaS removes that work and also removes those choices.
- Flexibility versus speed. A PaaS gets code running in minutes, but only on the languages and versions it supports. If you need a custom system library, you may have to move down to IaaS.
- Cost. Cost is not just the bill. IaaS can have the lowest price per unit of compute, yet it needs staff time to operate. SaaS has a higher price per user but almost no operating effort. Compare the total, including labor.
- Responsibility. In every model you remain responsible for your data and for who can access it. Only the layers below that line move to the provider.
Common mistakes
- Choosing IaaS "for control" when no requirement needs it, then spending weeks on patching.
- Assuming a PaaS can run any software. Check supported runtimes first.
- Comparing only the monthly price and ignoring operating labor.
Exercise
A team wants to run a legacy application that needs a specific Linux kernel module. Which model fits best, and why would PaaS be a poor choice?
Show answer
IaaS fits best, because you control the operating system and can load the kernel module. A PaaS manages the OS for you and supports only certain runtimes, so you cannot change the kernel.
Exercise
Place IaaS, PaaS, and SaaS in order from least to most provider-managed, and name which one you bill per user per month.
Show answer
IaaS, then PaaS, then SaaS. SaaS is the one usually billed per user per month.