Sub topic 7
Service models: who manages which layer
This chapter explains the service model idea: a cloud service model is a fixed split of the technology stack between you and the provider. It assumes you know what a server, an operating system, and an application are. It also assumes you have used web applications and know basic networking terms such as IP address and HTTP. Later chapters cover IaaS, PaaS, and SaaS one at a time. Here you get the shared frame they all use.
The idea: a line through the stack
Every running application sits on a stack of layers. From the bottom up, a typical stack looks like this:
- Physical facilities: buildings, power, cooling, and physical security.
- Hardware: servers, storage devices, and network gear.
- Virtualization: software that divides physical machines into virtual ones.
- Operating system: Linux or Windows running inside a virtual machine.
- Runtime and middleware: language runtimes, web servers, and libraries.
- Application: the code that does the useful work.
- Data and access: the information the application holds and the users who may reach it.
Someone has to operate every one of these layers. A service model answers one question: where does the line fall between "the provider operates this" and "you operate this"? Layers below the line belong to the provider. Layers above the line belong to you.
The three classic models draw that line at three different heights. The higher the line, the less you manage, and the less you can change.
Read the diagram as three columns of work that lands on you. The IaaS column is tall. The SaaS column is a single box. Everything not in your column is the provider's job.
The three positions of the line
The table shows who operates each layer. "You" means the customer. "Provider" means the cloud vendor.
| Layer | On-premises | IaaS | PaaS | SaaS |
|---|---|---|---|---|
| Facilities | You | Provider | Provider | Provider |
| Hardware | You | Provider | Provider | Provider |
| Virtualization | You | Provider | Provider | Provider |
| Operating system | You | You | Provider | Provider |
| Runtime and middleware | You | You | Provider | Provider |
| Application | You | You | You | Provider |
| Data and access | You | You | You | You |
The first column is on-premises, meaning hardware you own and run yourself. It is included as the baseline: the cloud models are different ways of handing layers off from that starting point.
Two details in the table are easy to miss.
- The lowest line, IaaS, still leaves the operating system to you. The provider gives you a virtual machine, and what happens inside it is your responsibility.
- The last row never moves. Even with SaaS, your data and your decisions about who can access it stay with you. The provider can run the database perfectly and you can still expose it by granting the wrong permissions.
The same task at three heights
Suppose you want a small web page that says hello. The work you do depends on where the line sits.
With IaaS, you request a virtual machine. This AWS CLI command asks for one:
# IaaS: you choose the machine image and size, then manage the OS and everything above it.
# The AMI ID below is a placeholder; use an image ID that exists in your region.
aws ec2 run-instances \
--image-id ami-0123456789abcdef0 \
--instance-type t3.micro \
--count 1The command returns a running machine with an operating system. Nothing is installed on it yet. You still have to connect, install a runtime, apply security updates, deploy the code, and keep it all running.
With PaaS, you provide only the application. This is the entire program:
from flask import Flask
application = Flask(__name__)
@application.route("/")
def index():
return "Hello from a PaaS-hosted app"You hand this file to a platform. The platform provisions servers, installs the operating system and the Python runtime, and starts the app. On AWS, Elastic Beanstalk is a PaaS-style service, and these commands deploy the code:
# PaaS: deploy application code to a managed platform (AWS Elastic Beanstalk CLI).
eb init my-app --platform python --region us-east-1
eb create my-app-env
eb deployWith SaaS, there is nothing to build. You use a finished product through its interface or API:
# SaaS: you consume the finished product through its interface or API.
# api.example.com and API_TOKEN are placeholders.
curl -H "Authorization: Bearer $API_TOKEN" \
https://api.example.com/v1/contactsThe three examples are the same stack with the line moved up each time. What you hold in your hands shrinks from a machine, to a code file, to an authentication token.
What moves with the line
Moving the line up changes several things at once. Knowing them lets you predict a model's behavior without memorizing it.
Effort
Each layer you hand off is a layer you stop patching, monitoring, and restarting. IaaS needs the most day-to-day work. SaaS needs the least. The work does not vanish. It transfers to the provider, who does it for many customers at once and spreads the cost.
Control
Each layer you hand off is also a layer you can no longer change. On IaaS you can install any kernel module or system package. On PaaS you can only use the languages, versions, and settings the platform supports. On SaaS you can only use the features the vendor built, plus whatever configuration options and APIs it exposes.
Responsibility
The provider is accountable for the layers it operates. You remain accountable for the rest. The shared responsibility chapter covers this in detail. For now, remember that the line for responsibility sits at the same place as the line for management.
Flexibility and portability
Lower lines keep more of your work portable. A virtual machine running standard Linux can often move to another provider with modest changes. A PaaS app that relies on a platform's proprietary features, or SaaS data trapped in a vendor's format, is harder to move. The trade-offs chapter returns to this.
Common errors
These mistakes come up often when people first meet the models.
- Assuming IaaS includes patching. The provider keeps the hypervisor and hardware current. The guest operating system is yours. An unpatched instance is a customer problem.
- Treating the models as three separate products. They are positions along one continuum. A real system often mixes them: a virtual machine (IaaS) running next to a managed database (PaaS) and a hosted email service (SaaS).
- Sorting a service by its name. Vendors label services loosely. Decide the model by asking which layers you operate, not by the marketing term.
- Believing SaaS needs no security work. The data and access row of the table is always yours. Weak passwords, missing multi-factor authentication, and overly broad sharing are customer errors in every model.
- Assuming a higher line is always cheaper. Less operations work usually reduces labor cost. The per-unit price of a managed service can still be higher than raw infrastructure. The pricing and comparison chapters weigh these.
A quick test for classifying a service
When you meet an unfamiliar service, ask these questions in order:
- Can I log in to the operating system and install what I like? If yes, it is IaaS.
- Do I upload my own code or configuration, with no access to the operating system? If yes, it is PaaS.
- Do I just sign in and use features someone else wrote? If yes, it is SaaS.
Some services fit none of these cleanly. Serverless functions and managed container platforms sit between the classic positions, and a later chapter covers where they fit.
Exercise
Your team runs a web app on a virtual machine that you rent from a cloud provider. A critical security update for the operating system is released. Who must apply it, and what would change if the same app ran on a PaaS?
Show answer
On the rented virtual machine (IaaS), your team must apply the operating system update, because the operating system sits above the provider's line. On a PaaS, the platform provider operates the operating system and runtime, so the provider applies the update. Your team would still be responsible for the application code and its own dependencies, plus the data and access settings.
Exercise
A company uses a hosted customer-relationship tool (SaaS). An employee's account is compromised because the password was weak and multi-factor authentication was off. Which side of the line is the failure on, and why?
Show answer
The failure is on the customer's side. In every service model, data and access management stay with the customer. The provider ran the application correctly. The company chose the sign-in settings and left them weak.
Exercise
You can upload code and choose a language version from a short list, but you cannot log in to the underlying server. Which model is this, and what is one thing you give up compared with IaaS?
Show answer
This is PaaS. You give up control of the operating system and runtime, so you cannot install arbitrary system packages or use a language version the platform does not offer.