IaaS, PaaS, and SaaS Explained

IaaS, PaaS, and SaaS Explained

The three layers of cloud services, who looks after what in each one, and how to pick the right layer for the job. Plain words, everyday comparisons, and real companies that run on each.

Think about an ordinary morning. You check your email, order a cab, stream a show while you eat breakfast, and maybe share a document with a colleague. Not one of those things runs on your phone or laptop. They run on powerful computers sitting in huge buildings called data centers, owned by someone else, and you simply rent a slice of their power.

But here is the part most people never see. “Renting computers” is not one thing. You can rent the bare machines, you can rent a ready-made workshop for building software, or you can rent a finished product that you just open and use. These three choices have names: IaaS, PaaS, and SaaS.

In this guide you will learn what each one means, how each one works inside, who is responsible for what, where each one shines, and where each one hurts. We will use real companies like Netflix, Spotify, Salesforce, and Dropbox so the ideas stay concrete. By the end, you will be able to look at any cloud product and say, “That is an IaaS,” or “That is a SaaS,” and explain why.

1The Big Picture: Why Cloud Services Come in Layers

Before we meet the three letters, we need to understand the problem they were invented to solve.

What is cloud computing?

Cloud computing means using computing power, storage, and software over the internet, and paying only for what you use. The word “cloud” is just a friendly way to say “somewhere out on the internet, run by a provider.” You do not need to know which building the machines are in. You only need to know how to reach them.

It exists because owning computers is hard. Before the cloud, a company that wanted to launch a website had to buy servers, wait weeks for delivery, find a room with cooling and backup power, hire people to look after the machines, and guess how much capacity it would need. Guess too low and the site crashed on launch day. Guess too high and money sat idle in a cold room.

Analogy

Imagine every house had to build its own power plant in the backyard. That would be expensive, noisy, and dangerous. Instead, we plug into the electricity grid and pay for the units we use. Cloud computing does the same thing for computers. The provider runs the “power plant,” and you plug in.

A short history

The idea of sharing big computers is old, going back to the 1960s. The modern cloud began in 2006, when Amazon Web Services launched its storage service (S3) and then its virtual server service (EC2). For the first time, anyone with a credit card could rent a server in minutes. Google App Engine arrived in 2008 and Microsoft Azure followed, offering ready-made platforms for developers. Meanwhile, Salesforce had been selling business software through a web browser since 1999.

By 2011 the industry had so many offerings that the United States standards body, NIST, wrote an official definition. It named three service models: Infrastructure as a Service, Platform as a Service, and Software as a Service. Those names stuck, and they are still the first thing people learn today.

3
service models: IaaS, PaaS, SaaS
2006
year AWS began renting servers by the hour
0
servers you must rack and cable yourself

Three layers, one idea

All three models share the same promise: let someone else handle the boring, heavy parts so you can focus on what makes your work special. They differ in how much they take off your plate.

  • IaaS (Infrastructure as a Service) hands you the raw machines, storage, and network. You build everything on top.
  • PaaS (Platform as a Service) hands you a ready-to-use platform. You bring only your code.
  • SaaS (Software as a Service) hands you a finished application. You bring only your data and your users.
i
Memory trick

Read the letters from I to P to S. As you move toward S, you manage less and the provider manages more. Control goes down, convenience goes up.

Public, private, and hybrid clouds

The three service models describe what you rent. A separate question is where it lives. In a public cloud, such as AWS, Microsoft Azure, or Google Cloud, the provider’s machines are shared by many customers, kept apart by software. In a private cloud, the machines serve only one organization, either in its own building or in a dedicated corner of a provider’s. A hybrid cloud joins the two, so sensitive records can stay in a private place while public websites run on shared machines.

You can have IaaS, PaaS, or SaaS in any of these settings. The service model tells you how much you manage. The deployment type tells you who shares the hardware with you. Mixing up the two is one of the most common mix-ups, so keep them in separate boxes in your head.

2IaaS: Renting the Raw Building Blocks

IaaS is the lowest layer. It gives you the machines and the wires, and trusts you to do the rest.

What it is

Infrastructure as a Service lets you rent basic computing resources over the internet. The main pieces are virtual machines (computers that exist as software on a larger physical computer), storage (places to keep files and disks), and networking (the private roads that connect everything). You choose how big each piece is and switch it on in minutes.

It exists because buying and housing hardware is slow and costly. With IaaS, a company can start a hundred servers on Monday for a big project and shut them all down on Friday. It pays only for the hours they ran.

Analogy

IaaS is like renting an empty commercial kitchen. The building is there, the ovens work, the gas and water are connected, and the fridge is plugged in. But there is no cook, no menu, and no ingredients. You decide what to cook, hire the staff, and clean up after yourself.

What you manage and what the provider manages

The provider looks after the physical world: the building, the power, the cooling, the cables, the physical servers, and the software layer that slices one big machine into many virtual ones. You look after everything from the operating system upward. That includes installing updates (called patches), setting up security rules, installing your software, and keeping backups.

This is a lot of freedom, and it comes with a lot of work. If you forget to patch your operating system and an attacker walks in, that is on you, not on the provider.

The building blocks you get

Compute

Virtual machines

Rentable computers in many sizes, from tiny to enormous. Examples: Amazon EC2, Azure Virtual Machines, Google Compute Engine.

Storage

Disks and file stores

Block disks that act like a hard drive for one machine, and object stores that hold huge piles of files, like Amazon S3.

Network

Virtual private networks

Your own fenced-off section of the provider’s network, with subnets, routes, and firewall rules you control.

Traffic

Load balancers

Traffic police that spread incoming visitors across many machines so none gets overwhelmed.

Identity

Access control

Rules that say which person or program may touch which resource, and what they may do with it.

Location

Regions and zones

Many separate data center groups around the world, so you can place your systems close to your users and spread risk.

Where IaaS is used

IaaS fits teams that need full control. Typical cases include moving an old application to the cloud without rewriting it, running software that needs a special operating system, crunching huge batches of data for a few hours, building test environments that appear and vanish, and keeping a backup site ready in case the main one fails.

A famous example is Netflix. The company began moving away from its own data centers in 2008, after a database failure stopped DVD shipments for days. By 2016 it had moved its customer-facing systems to AWS, using a huge fleet of rented machines that grows and shrinks with viewing demand. Netflix still delivers the video itself through its own network of servers placed inside internet providers, but the brains of the service run on rented infrastructure.

!
Watch out

A virtual machine bills you for every hour it is on, even if nobody is using it. A forgotten test server can quietly cost money for months. Always switch off what you do not need.

3PaaS: Renting a Ready-Made Workshop

PaaS sits in the middle. The platform handles the plumbing, and you handle the creative work.

What it is

Platform as a Service gives developers a ready-to-use environment for building, running, and managing applications. You do not rent a machine and then set it up. Instead, you hand the platform your code, and it figures out where to run it, how to keep it alive, and how to add more copies when traffic grows.

It exists because many developers do not want to spend their days fixing servers. A developer’s real job is to build features that customers love. PaaS removes the chores that stand in the way: installing operating systems, applying security patches, setting up load balancers, and wiring up deployment steps.

Analogy

PaaS is like renting a fully equipped workshop with helpful staff. The tools are on the wall, the lights are on, the floor is swept, and an assistant restocks supplies. You walk in with your design, build your product, and walk out. You never think about the electricity bill or who fixes the saw.

What the platform does for you

  • Looks after the operating system. It installs updates and security fixes without you lifting a finger.
  • Provides the runtime. A runtime is the environment your code needs to run, such as the right version of Java, Python, Node.js, or .NET.
  • Scales automatically. When more visitors arrive, it starts more copies of your app. When they leave, it removes the extras.
  • Handles deployment. You push your code, and the platform builds it and releases it, often in a few minutes.
  • Offers add-ons. Databases, caches, message queues, and logging tools can be attached with a few clicks.

Well-known PaaS products

Pioneer

Heroku

Founded in 2007 and later bought by Salesforce. Loved by startups for its simple “push your code and it runs” flow.

Google

Google App Engine

Runs your web apps and grows them automatically, with no servers to name or count.

AWS

Elastic Beanstalk

Upload your application and AWS sets up the machines, balancing, and scaling behind the scenes.

Microsoft

Azure App Service

A managed home for websites and APIs, with built-in security updates and scaling.

Bring your code. The platform brings everything else.

The catch

The workshop is convenient, but it has house rules. The platform decides which programming languages are supported, which versions you may use, and how your app must be packaged. If your application needs a strange operating system setting or special hardware, a PaaS may say no. You also depend on the platform’s design: if it has a limit on how long a request may run, your app must live with that limit.

Many teams accept these rules happily. A small team at a young company can ship a product in days instead of months. As the company grows and its needs become unusual, it may later move some parts down to IaaS for more control.

4SaaS: Just Open the App and Use It

SaaS is the layer most people already use every day without knowing its name.

What it is

Software as a Service means a finished application that you use through a web browser or a mobile app, usually paying a monthly or yearly subscription. There is nothing to install on a server, nothing to patch, and nothing to scale. The provider runs the whole thing and gives every customer access.

It exists because most organizations do not want to build their own email system, their own accounting tool, or their own customer database. These problems are already solved well. It is cheaper and faster to subscribe to a good product than to create one from scratch.

Analogy

SaaS is like eating at a restaurant. You do not buy ingredients, cook, or wash dishes. You sit down, order, and enjoy. You still make choices, such as what to order and how spicy to have it, but the kitchen is not your problem.

Everyday examples

Gmail and Google Workspace for email and documents. Microsoft 365 for Word, Excel, and Teams. Salesforce for managing customers. Slack for team chat. Zoom for video meetings. Dropbox for file sharing. Atlassian’s Jira Cloud for tracking work. Shopify for running an online shop. If you open it in a browser, log in, and your data is waiting, it is almost certainly SaaS.

Salesforce is a good story. When it launched in 1999, its slogan was “The End of Software,” because customers no longer had to buy discs, install programs, and hire people to run servers. The company grew into one of the largest software firms in the world by proving that businesses would trust a browser with their most important data.

How SaaS is different from the other two

With IaaS and PaaS you build something. With SaaS you configure something. You change settings, create users, design forms, and connect other tools, but you do not change the underlying program. Another important difference is that SaaS is almost always multi-tenant. That means many customers, called tenants, share the same running application, while the software keeps each customer’s data separated. We will see how that works in a later chapter.

Who is it for?

Anyone who needs a common business function and does not want to run technology to get it. A ten-person shop and a ten-thousand-person company can both use the same SaaS accounting tool, and neither needs to know what a server is.

i
Do not forget

“The provider runs it” does not mean “you have no work.” You still decide who gets an account, which permissions they have, how strong the login protection is, and what happens to the data when an employee leaves.

5Side by Side: Who Manages What

The clearest way to tell the three models apart is to ask one question: which layers do I look after, and which does the provider look after?

The responsibility ladder

Every computer system is built from layers stacked on top of each other. At the bottom are the physical machines. At the top is the application that people actually use. The table below shows who is responsible for each layer when you run everything yourself (called on-premises) and in each of the three cloud models.

LayerOn-premisesIaaSPaaSSaaS
Application and its settingsYouYouYouProvider (you configure)
Your dataYouYouYouYou
Runtime and middlewareYouYouProviderProvider
Operating systemYouYouProviderProvider
VirtualizationYouProviderProviderProvider
Servers, storage, networkYouProviderProviderProvider
Building, power, coolingYouProviderProviderProvider

Notice the row in the middle: your data is always yours to protect, in every model. Even with SaaS, you decide who may see it and how long to keep it. This one row causes more real-world security problems than any other.

A quick comparison

QuestionIaaSPaaSSaaS
What do you get?Machines, storage, networkA place to run your codeA finished application
Who uses it?System administrators, cloud architectsSoftware developersEveryday workers and customers
ControlHighestMediumLowest
Effort to runHighestMediumLowest
Speed to startHoursMinutesSeconds
Typical price stylePer hour or per second of usePer app size or usagePer user per month
ExamplesEC2, Azure VMs, Compute EngineHeroku, App Engine, App ServiceGmail, Salesforce, Slack

How they stack on each other

The three models are not rivals so much as floors in one building. A SaaS product like Slack is built by developers using platform tools, which in turn run on rented infrastructure. Slack itself runs on AWS. So when you chat with a friend on a SaaS app, you are standing on the top floor of a building whose lower floors you never see.

flowchart LR
    U["You, the customer"] --> SaaS["SaaS: finished app
Gmail, Salesforce"] D["Developers"] --> PaaS["PaaS: ready platform
Heroku, App Engine"] A["Admins and architects"] --> IaaS["IaaS: raw infrastructure
EC2, Azure VMs"] SaaS -. runs on .-> PaaS PaaS -. runs on .-> IaaS IaaS --> HW["Provider data centers
servers, storage, network"]
Fig 1. The three service models as floors of one building. Each audience enters on the floor that suits its needs.

The diagram reads from left to right. On the far left are the different kinds of people. Each kind of person walks into a different floor. Customers use the finished app. Developers build on the platform. Architects and administrators work directly with infrastructure. The dotted lines show that higher floors usually stand on lower ones, and everything finally rests on the provider’s physical data centers.

6Architecture and Components

Now let us open the box. What parts does each model contain, and how do they fit together?

Regions and zones: the foundation under everything

Every big cloud provider divides the world into regions, which are geographic areas such as “Mumbai” or “Frankfurt.” Inside each region there are several availability zones. A zone is one or more data centers with their own power, cooling, and network. Zones in the same region are close enough to talk to each other very fast, but far enough apart that a fire or power cut in one does not take down the others.

Why does this matter? If you place your system in only one zone, one bad day can stop it. If you spread it across two or three zones, it can survive the loss of a whole building. Placing systems near your users also makes pages load faster, and some countries have laws that say certain data must stay inside their borders.

A typical IaaS setup

Let us picture a small online shop built on IaaS. The owner rents a private network, puts a load balancer at the front door, runs several virtual machines that hold the shop software, and attaches a database and disks. Because the owner chose every piece, the owner must also connect and protect every piece.

flowchart TB
    subgraph VPC["Your Virtual Private Network"]
        LB["Load Balancer"]
        VM1["Virtual Machine 1"]
        VM2["Virtual Machine 2"]
        DB["Database Server"]
    end
    Internet["Internet users"] --> LB
    LB --> VM1
    LB --> VM2
    VM1 --> DB
    VM2 --> DB
    VM1 --> Disk1["Block Storage Disk 1"]
    VM2 --> Disk2["Block Storage Disk 2"]
    DB --> Backup["Object Storage for backups"]
Fig 2. A small web shop on IaaS. Every box inside the private network is something the customer chose, built, and must look after.

Follow the arrows from the top. Visitors on the internet reach the load balancer first. The load balancer picks a healthy virtual machine and passes the visitor along. Both machines read and write to the same database. Each machine has its own disk, and the database sends copies of its data to cheap object storage so a backup exists if something breaks. The load balancer is also what lets you add a third or fourth machine later without visitors noticing.

A typical PaaS setup

On a PaaS, most of those boxes disappear from your view. The platform owns them. What remains is a cleaner pipeline that moves your code from your laptop to the users.

flowchart LR
    Dev["Developer pushes code"] --> Build["Build system"]
    Build --> Pack["Packaged application"]
    Pack --> Run["Managed runtime"]
    Router["Platform router and load balancer"] --> Run
    Users["Users"] --> Router
    Run --> Addon["Managed add-ons: database, cache, queue"]
    Scaler["Autoscaler"] --> Run
    Run --> Metrics["Built-in logs and metrics"]
    Metrics --> Scaler
Fig 3. A PaaS pipeline. The developer touches only the first box. The platform operates everything after it.

The developer pushes code. The build system turns it into a packaged application. The platform starts the package inside a managed runtime and connects it to the router, which receives user traffic. Add-ons such as a database are attached as services. The autoscaler watches the metrics coming out of the runtime and adds or removes copies as needed. Notice the loop at the bottom: the platform watches itself and adjusts itself.

A typical SaaS setup

From the outside, a SaaS product looks like a single website. Inside, it usually has a front end (what you see), an API layer (the doorway that the front end and other programs use), a business logic layer (the rules of the product), a data layer (where customer data lives), and a tenancy layer that keeps customers apart. It also offers integrations, which are ready-made connections to other tools, so your SaaS apps can talk to each other.

i
Good to know

The word API stands for Application Programming Interface. It is a menu of requests that one program can make to another. Almost every modern SaaS product offers an API, which is how companies connect, for example, their sales tool to their email tool.

7How They Work Internally

The magic of the cloud is sharing. Many customers use the same physical machines, yet none can see the others. Here is how that is done.

Virtualization: one machine, many computers

Virtualization is the technique that lets one physical server pretend to be many separate computers. A special layer of software called a hypervisor sits between the hardware and the virtual machines. It hands out slices of the processor, memory, and disk to each virtual machine, and it makes sure no machine can peek into another’s slice.

Analogy

A hypervisor is like the manager of an apartment building. One building holds many families. Each family has its own front door, its own lock, and its own private rooms. The manager looks after the shared pipes and the roof, but never walks into your flat uninvited.

Real providers have refined this a lot. Amazon’s Nitro system, for example, moves much of the virtualization work onto dedicated hardware cards, so more of the main server’s power goes to the customer and less to the hypervisor. It builds on a widely used open technology called KVM. Google Compute Engine also uses KVM. Earlier generations of EC2 used a different hypervisor called Xen.

Containers: lighter than virtual machines

A virtual machine carries a whole operating system. A container is lighter. It packs an application with just the files and settings it needs, and several containers share the same operating system underneath. Containers start in seconds and use less memory.

Most PaaS products run your code in containers. When you push your code, a tool often called a buildpack looks at it, works out which language you used, gathers the right runtime, and produces a container. A scheduler then decides which machine in the platform’s big pool has room for it, and a router sends visitors to it. If the machine fails, the scheduler quietly starts a new copy elsewhere. This is why developers on a PaaS rarely get woken up by a dead server.

How a platform decides when to scale

Autoscaling sounds like magic, but it follows simple rules that you can understand. The platform keeps watching a few numbers, such as how busy the processors are or how many requests are waiting in line. When a number crosses a limit you chose, for example “processors above seventy percent for five minutes,” the platform starts another copy of your application. When the number falls well below another limit, it removes a copy.

The waiting period matters. Starting a copy takes time, and removing one too early can cause a wobble when visitors return. Good rules react quickly to a rush but slowly to a lull. Think of a lifeguard who blows the whistle the moment the beach fills up, but waits a while before sending the extra staff home.

Multi-tenancy: how SaaS shares one application

In a multi-tenant system, many customers share one running copy of the software. This is what makes SaaS cheap. The provider updates one application, and every customer gets the update at the same time. But sharing is only safe if every request is checked.

flowchart TB
    T1["Customer A"] --> GW["API Gateway and Login"]
    T2["Customer B"] --> GW
    T3["Customer C"] --> GW
    GW --> App["Shared Application Servers"]
    App --> Check["Tenant Check on every request"]
    Check --> DB["Shared Database with a tenant ID on every row"]
    Check --> Cache["Shared Cache with tenant-based keys"]
    Check --> Files["File Storage with tenant folders"]
Fig 4. Multi-tenant SaaS. Every request is stamped with who is asking, and every data lookup is filtered by that stamp.

Here is the flow in words. Customers log in through the gateway. The gateway proves who they are and which company they belong to. The shared application servers handle the request, but before touching any data, a tenant check makes sure the request only reaches that company’s rows, cache entries, and files. A single mistake in this check could expose one customer’s data to another, which is why SaaS companies invest heavily in testing it.

Three ways to separate tenants

Cheapest

Shared everything

One database, one set of tables, a tenant ID on each row. Very efficient, but needs very careful code.

Balanced

Separate schema

One database server, but each customer gets its own set of tables. Easier to isolate and to restore one customer.

Strongest

Separate database

Each customer has a database of its own. Costs more, but suits customers with strict security rules.

Premium

Dedicated stack

A full private copy of the application for one big customer. Maximum isolation, maximum price.

!
The noisy neighbor

When many tenants share resources, one very busy tenant can slow others down. Good providers set limits on how much any one customer can use, so a single heavy user cannot spoil the experience for everyone.

8Data Flow and Lifecycle

Let us follow one visitor’s request from the browser to the data and back, then follow the life of an application from birth to retirement.

Following one request

Imagine you open an online shop that runs on the cloud. Your browser first needs to find the shop’s address. It asks a system called DNS, which works like a phone book for the internet. Then it sends the request to the shop’s front door, usually a load balancer. The load balancer passes it to a healthy server. The server reads and writes data, builds the page, and sends it back the same way.

sequenceDiagram
    participant U as User
    participant D as DNS
    participant L as Load Balancer
    participant A as App Server
    participant S as Database
    U->>D: Where is the shop address
    D-->>U: Here is the address
    U->>L: Request the page
    L->>A: Forward to a healthy server
    A->>S: Read and write data
    S-->>A: Result
    A-->>L: Page built
    L-->>U: Page delivered
Fig 5. The life of a single web request. The same path appears in IaaS and PaaS; in PaaS the platform runs the middle boxes for you.

The path is almost the same in every model. What changes is who looks after each stop. On IaaS you built the load balancer, the servers, and the database. On PaaS the platform operates them. On SaaS, all the stops belong to the provider, and you only see the final page.

The life of an application

Every application goes through stages. The effort you spend on each stage depends on the model you chose.

1

Provision

Get the resources. On IaaS you create machines and networks. On PaaS you create an app. On SaaS you create an account.

2

Configure

Set things up. IaaS needs operating system and software setup. PaaS needs settings and add-ons. SaaS needs users, roles, and options.

3

Deploy

Release the software. On IaaS you copy it to machines. On PaaS you push code. On SaaS this step is the provider’s job.

4

Operate and scale

Keep it healthy as demand changes. IaaS needs you to add machines. PaaS scales for you with rules you set. SaaS scales without you noticing.

5

Patch and update

Apply fixes. You patch the operating system on IaaS. The platform does it on PaaS. The provider updates everything on SaaS.

6

Retire

Shut it down and clean up. Delete machines, disks, and backups you no longer need, or export your data from the SaaS before you cancel.

The lifecycle of data

Data also has a life: it is created, stored, used, backed up, archived, and finally deleted. In IaaS you decide where each copy lives and how long it stays. In PaaS the database add-on helps with backups, but you decide the retention rules. In SaaS the provider stores the data, yet you remain responsible for deciding what goes in, who can see it, and how to get it out. Always ask, before signing up for a SaaS product: “If I leave, can I export my data in a usable form?”

9Advantages, Disadvantages, and Trade-offs

No model is best for everything. Each one trades something for something else.

IaaS

Pros

  • Maximum control over the operating system and software
  • Runs almost any application, including very old ones
  • Pay only for what you switch on
  • Fast to expand to many regions

Cons

  • You must patch, secure, and monitor the machines
  • Needs skilled operations people
  • Easy to overspend on idle resources
  • Slower to deliver features than a platform

PaaS

Pros

  • Developers focus on code, not servers
  • Built-in scaling, patching, and deployment
  • Great for small teams and fast launches
  • Less operations staff needed

Cons

  • Limits on languages, versions, and settings
  • Harder to move to another provider
  • Can become costly at very large scale
  • Less visibility into what happens underneath

SaaS

Pros

  • Ready to use in minutes
  • No servers or software to maintain
  • Updates arrive automatically
  • Predictable monthly cost per user

Cons

  • Limited customization beyond settings
  • Your data lives in someone else’s system
  • Price grows with the number of users
  • If the provider is down, you wait

How you pay in each model

Money works differently on each floor of the building. With IaaS, you pay for the resources you switch on, usually counted by the second or the hour: machine time, disk space, and the amount of data that leaves the provider’s network. Providers also offer discounts if you promise to use a steady amount for one or three years, or cheaper “spare capacity” machines that can be taken back with short notice.

With PaaS, you usually pay for the size and number of running application copies, plus add-ons such as databases. The price is simple to read, but it often includes a premium for the work the platform does for you. With SaaS, you pay a flat fee per user per month, often with tiers that unlock more features. The invoice is easy to predict, yet it grows every time you add a person, so a large company should review its seat counts regularly.

The key habit is to compare the total cost, not just the line on the bill. A cheap machine that needs a full-time engineer to look after it may cost more than an expensive platform that needs nobody.

The trade-off triangle

Three forces pull against each other: control, convenience, and cost. IaaS gives you the most control but demands the most work. SaaS gives you the most convenience but the least control. PaaS sits in between. Cost depends on scale: at a small size, the convenient options are cheaper because you do not need a big operations team. At a very large size, the raw options can be cheaper because you can tune them to your exact needs.

Trade-offLeaning toward IaaSLeaning toward SaaS
Speed to launchSlowerFaster
Custom behaviorAnything is possibleOnly what the product allows
Staff neededMany skilled engineersA few administrators
Lock-in riskMedium, mostly in extra servicesHigh, because of your data and habits
Cost at small scaleHigher in effortLower in effort
i
A real lesson

Dropbox began by storing files on Amazon S3. As it grew huge, it built its own storage system, called Magic Pocket, and moved most files there around 2015 and 2016 to save money and gain control. The company of 37signals, makers of Basecamp, also left the cloud in 2022 and 2023 for the same reason. These are not signs that the cloud is bad. They show that the best answer changes with size, skill, and predictability of demand.

10Security and the Shared Responsibility Model

The cloud is not automatically safe or unsafe. It is safe when both sides do their part.

The shared responsibility model

Cloud providers describe security as a partnership. The provider secures the cloud itself: the buildings, the hardware, and the basic software that runs everything. The customer secures what they put in the cloud: their data, their accounts, and their settings. The line between the two moves as you go from IaaS to SaaS, exactly as the table in Chapter 5 shows.

Analogy

Think of a hotel. The hotel provides the building, the security guard, and the lock on your door. But if you leave your door propped open or hand your key card to a stranger, the hotel cannot protect you. The cloud works the same way: the provider builds a strong lock, and you must remember to use it.

The most important protections

Identity

Strong logins

Use multi-factor authentication, which asks for a second proof such as a phone code. This single step blocks a large share of account break-ins.

Access

Least privilege

Give every person and program only the permissions they need. A report writer should not be able to delete servers.

Data

Encryption

Scramble data while it travels (in transit) and while it sits on disk (at rest), so stolen copies are unreadable.

Network

Segmentation

Divide your network into rooms with locked doors. If an attacker enters one room, they cannot walk into all the others.

Patching

Stay up to date

On IaaS you apply fixes yourself. On PaaS and SaaS the provider does, but you must still update your own code and plug-ins.

Rules

Compliance

Standards such as SOC 2, ISO 27001, HIPAA for health data, and GDPR for personal data in Europe define what proper care looks like.

Who holds the keys

Encryption turns readable data into scrambled data that only a secret key can unlock. In most cloud services the provider manages the keys for you by default, which is simple and safe for many uses. For stricter needs, providers let you create and control your own keys inside a special protected service, so you can switch off access to your data by disabling the key.

Think of a safe-deposit box at a bank. The bank holds the vault, but you hold the key to your own box. The more sensitive the contents, the more you want to be the one holding that key and the less you want to trust a copy lying around somewhere. Whichever approach you choose, keep keys and passwords out of your source code and out of places where many people can read them.

What usually goes wrong

Most cloud breaches are not caused by the provider’s walls being broken. They are caused by misconfiguration: a storage bucket left open to the public, a password left at its default, an access key pasted into a public code site, or a firewall rule that is too wide. In 2019, a large bank in the United States, Capital One, suffered a major data theft after an attacker took advantage of a misconfigured web application firewall on its AWS setup. The cloud itself was not broken. A setting was wrong.

Security in each model

  • IaaS: You protect the operating system, the network rules, the software you installed, and your data. This is the largest list.
  • PaaS: You protect your code, your secrets (passwords and keys), your data, and who may deploy to the platform.
  • SaaS: You protect user accounts, permissions, sharing settings, and connected third-party apps. Many SaaS leaks come from files shared with “anyone with the link.”
!
Shadow IT

When employees sign up for SaaS tools on their own, without telling the company, sensitive data can end up in places nobody is watching. This is called shadow IT. Good companies keep a list of approved tools and make it easy to request new ones.

11Monitoring, Logging, and Metrics

You cannot fix what you cannot see. Monitoring is how you keep an eye on a system you do not physically touch.

Three kinds of signals

Metrics are numbers measured over time, such as how busy the processor is or how many requests arrived per minute. Logs are written records of events, such as “user logged in” or “payment failed.” Traces follow a single request across many services so you can see where time was spent.

Analogy

Think of a car. The dashboard shows live numbers like speed and fuel, which are your metrics. The black box in an aircraft records everything that happened, which is like logs. A delivery tracker that shows a parcel moving through each city is like a trace.

The four golden signals

Google’s site reliability engineers popularized four simple signals that tell you whether a service is healthy. They apply to almost any system.

Latency
how long requests take
Traffic
how many requests arrive
Errors
how many requests fail

The fourth signal is saturation, which means how full your resources are. A server that is ninety-five percent busy has no room for a surprise.

The flow of monitoring data

flowchart LR
    Src["Apps, machines, platform, SaaS audit logs"] --> Col["Collectors and agents"]
    Col --> Store["Log and metric storage"]
    Store --> Dash["Dashboards"]
    Store --> Rules["Alert rules"]
    Rules --> Pager["On-call engineer"]
    Pager --> Fix["Investigate and fix"]
Fig 6. From raw signals to a human who can act. Each stage filters noise so only important problems wake someone up.

What you can watch in each model

  • IaaS: Everything. Install agents on your machines, watch disk space, memory, processor use, network traffic, and operating system logs. Tools like Amazon CloudWatch, Azure Monitor, and Google Cloud Monitoring help.
  • PaaS: Application-level signals. You see request times, error rates, and application logs, but not the machine underneath.
  • SaaS: Very little of the inside. You rely on the provider’s status page, uptime promises (called service level agreements, or SLAs), and audit logs that show who did what in your account.

Setting goals: SLIs, SLOs, and SLAs

Numbers are only useful when you know what a good number is. Reliability teams use three related terms. A service level indicator, or SLI, is something you measure, such as the share of requests that finish in under half a second. A service level objective, or SLO, is the goal you set for that measure, such as “ninety-nine point nine percent of requests are fast enough.” A service level agreement, or SLA, is the formal promise a provider makes to customers, often with refunds if it is broken.

An SLO gives your team a shared definition of “good enough.” If you are well inside the goal, you can take risks and ship new features. If you are close to missing it, you slow down and fix reliability first. When you buy SaaS, read the provider’s SLA with care, because it tells you what you can count on and what you must plan for yourself.

Do not forget cost

Money is also a metric. Cloud bills grow quietly, so set budgets and alerts. Most providers can send a warning when spending crosses a limit you choose. Tagging every resource with a team name or project name lets you see who is spending what, which turns a confusing bill into a helpful map.

12Design Patterns and Anti-Patterns

A pattern is a proven recipe. An anti-pattern is a mistake so common that it earned a name.

Patterns that work

IaaS

Three-tier layout

Split the system into a web layer, an application layer, and a data layer, each in its own network zone. If one layer is attacked, the others stay protected.

IaaS

Auto-scaling group

A set of identical machines behind a load balancer that grows when busy and shrinks when quiet. Like a restaurant calling in extra waiters at lunch rush.

PaaS

Twelve-factor app

A set of habits published in 2011 by Heroku’s co-founder: keep settings outside the code, treat add-ons as swappable, and keep the app stateless so any copy can handle any request.

SaaS

Single sign-on

One company login opens every SaaS tool. When an employee leaves, switching off one account closes every door at once.

All

Strangler migration

Move an old system to the cloud one slice at a time, letting the new parts slowly replace the old, instead of one risky big switch.

All

Multi-zone deployment

Run copies in at least two availability zones so the loss of one building does not stop the service.

The stateless idea deserves a closer look. A stateless server does not remember anything about you between requests. All memory lives in a shared database or cache. That means any copy of the server can serve any visitor, so adding or removing copies is easy. It is like a bank with many identical tellers who all read from the same customer records, rather than one teller who keeps your file in a private drawer.

Anti-patterns to avoid

ANTI-PATTERN 01 · SNOWFLAKE SERVERAvoid
What it looks like

A virtual machine that someone set up by hand, tweaked for months, and never wrote down. Nobody knows exactly how it was built.

Why it hurts

If it breaks, nobody can rebuild it. It cannot be copied for scaling. It is a pet that needs constant care instead of cattle that can be replaced.

Better way

Describe your infrastructure in saved, repeatable templates, so any machine can be recreated in minutes from the same recipe.

ANTI-PATTERN 02 · LIFT AND FOREVER SHIFTAvoid
What it looks like

Copying an old application into rented virtual machines and calling the cloud project finished.

Why it hurts

You pay cloud prices but get none of the cloud benefits, such as automatic scaling or managed databases. The bill goes up while the pain stays the same.

Better way

Treat lift-and-shift as a first step only. Then replace pieces with managed services as time allows.

ANTI-PATTERN 03 · SAAS SPRAWLAvoid
What it looks like

Every team buys its own tools. Soon the company pays for five chat apps and three project trackers, and company data is scattered.

Why it hurts

Wasted money, weak security, and no single place to find information.

Better way

Keep a catalog of approved tools, review it each year, and connect tools through single sign-on.

ANTI-PATTERN 04 · NO EXIT PLANAvoid
What it looks like

Building everything on one provider’s unique features without asking how you would ever leave.

Why it hurts

Prices, policies, or outages can then hold you hostage. Moving later becomes a huge project.

Better way

Prefer open standards where it costs little, keep data exportable, and decide on purpose which lock-in is worth the benefit.

13Best Practices and Common Mistakes

These habits separate calm cloud teams from stressed ones.

Habits worth building

1

Start with identity

Turn on multi-factor login for every account on day one. Give each person and program the smallest set of permissions that lets them work.

2

Automate the setup

Write your infrastructure as repeatable templates so you can rebuild anything quickly and review changes like any other work.

3

Tag everything

Label each resource with its owner, project, and purpose. Untagged resources are the ones nobody dares to delete.

4

Set budgets and alerts

Pick a monthly limit and get a warning at fifty, eighty, and one hundred percent. Surprises belong in birthday parties, not bills.

5

Back up and test the restore

A backup you have never restored is only a hope. Practice the recovery before you need it.

6

Design for failure

Assume a machine, a zone, or even a whole region can fail. Spread copies around and decide in advance what happens when something breaks.

7

Read the contract

Check the uptime promise, the data export rules, and where your data is stored before you commit to a SaaS product.

Common mistakes

  • Leaving storage open to the public. Always check sharing settings after creating a bucket or a shared folder.
  • Believing the provider backs up everything for you. Many SaaS tools keep data safe from hardware failure, but not from your own mistake, such as deleting a folder. Ask what restore options exist.
  • Using one giant account for everything. Separate production from testing so a slip in testing cannot touch real customers.
  • Choosing by fashion. Picking a tool because it is popular, not because it fits the need.
  • Ignoring data location. Placing personal data in a region that breaks a legal rule.
  • Skipping the cleanup. Forgetting old test machines, disks, and snapshots that keep costing money.
!
Outages happen

Even the largest providers have had outages that took many popular websites offline at once. An outage in one region has repeatedly shown how many services depend on the same few places. If your business cannot afford to stop, plan for it: use several zones, and for the most critical systems, consider several regions.

14Real-World Examples

Real companies show how the three models are chosen and mixed in practice.

Netflix: IaaS at massive scale

Netflix runs the control side of its service, such as accounts, recommendations, and billing, on rented AWS machines that grow and shrink with demand. Video itself flows through Netflix’s own content delivery network, Open Connect, whose servers sit inside internet providers close to viewers. It is a smart mix: rent flexibility where demand is unpredictable, own hardware where the workload is steady and huge.

Spotify: moving to a cloud platform

Spotify moved its systems from its own data centers to Google Cloud over roughly 2016 to 2018. It wanted its engineers to spend time on music features and recommendations, not on running hardware. It also took advantage of Google’s managed data tools to handle the enormous amount of listening data it collects.

Dropbox: starting rented, then bringing storage home

Dropbox began on Amazon S3 so it could grow fast without buying hardware. When its storage became enormous and predictable, it built its own system and moved most files over. The lesson is balance: renting is superb for starting and for spikes, while owning can win when the load is vast and steady.

Heroku and the startup path

Thousands of young companies have launched on platforms like Heroku because a two-person team can push code and have a live product the same day. Many later move parts of their system to IaaS when they need special tuning or lower costs at scale.

Salesforce, Slack, and Zoom: SaaS giants built on cloud floors

Salesforce proved businesses would run their sales teams from a browser. Slack, which runs on AWS, shows the stack at work: a SaaS product standing on rented infrastructure. For their customers, none of that is visible. They simply open an app.

Microsoft 365 and Google Workspace: replacing the office server room

Twenty years ago, most offices kept an email server in a back room and a person to babysit it. Today, millions of organizations use Microsoft 365 or Google Workspace instead. Mail, calendars, documents, and video meetings all come as one subscription. The IT team’s work changes from fixing servers to managing accounts, sharing rules, and security settings, which is exactly the SaaS shift in responsibility described in this guide.

A typical growth story

Picture a small company that starts as three friends with an idea for a delivery app. On day one they use SaaS for email, documents, chat, and accounting, because they have no time to run any of that. When they build their product, they use a PaaS so they can ship quickly. As they grow to millions of users, they start using IaaS pieces for special needs: custom databases, heavy data processing, and tighter cost control. Along the way they keep using SaaS for everything that is not their core product. Most real companies end up with a mix of all three.

The smartest teams do not pick one model forever. They pick the right one for each job.

15Beyond the Big Three, and How to Choose

The industry has added many “as a Service” flavors. Knowing them helps you read cloud menus with confidence.

More flavors of “as a Service”

FaaS

Function as a Service

You upload a tiny piece of code, and the provider runs it only when an event happens. You pay per run. AWS Lambda, launched in 2014, made this popular. Often called serverless.

CaaS

Container as a Service

A managed home for containers. Kubernetes, created at Google, is the usual engine. Services like Amazon EKS and Google GKE run it for you.

DBaaS

Database as a Service

A database run by the provider, with backups and updates handled. Amazon RDS, launched in 2009, and Google Cloud SQL are well-known examples.

XaaS

Anything as a Service

The general idea: whatever you can rent instead of own, from security to analytics, will eventually be offered as a service.

These sit between the big three. For example, FaaS and CaaS are platform-like, because the provider hides the machines. A managed database is a small piece of PaaS that you attach to IaaS or PaaS applications.

A simple way to choose

When facing a new need, ask a few questions in order. The first answer that fits usually points to the right layer.

flowchart TD
    Start["A new need appears"] --> Q1{"Does a ready-made product already do the job?"}
    Q1 -- Yes --> SaaS["Choose SaaS"]
    Q1 -- No --> Q2{"Do you need control over the operating system or special hardware?"}
    Q2 -- Yes --> IaaS["Choose IaaS"]
    Q2 -- No --> Q3{"Are you building custom software your team will maintain?"}
    Q3 -- Yes --> PaaS["Choose PaaS"]
    Q3 -- No --> SaaS
Fig 7. A decision path for picking a service model. Start from the top and follow the answers.
Your situationGood fitWhy
You need email, chat, or accountingSaaSThese are solved problems. Do not rebuild them.
Small team building a web productPaaSShip fast without hiring operations staff.
Old application that cannot changeIaaSIt needs its original environment.
Big, steady workload with special tuningIaaSControl lets you lower unit costs.
Occasional jobs triggered by eventsFaaSPay only when it runs.
Strict rules about data and hardwareIaaS, perhaps private cloudYou need to prove where and how data is handled.
i
Hybrid and multi-cloud

A hybrid cloud mixes your own data center with a public cloud. A multi-cloud setup uses more than one provider. Both can reduce risk and meet special rules, but they add complexity. Do not choose them just because they sound sophisticated. Choose them when you have a clear reason.

16Frequently Asked Questions

Quick answers to the questions people ask most.

Q1Is the cloud just someone else’s computer?
In a literal sense, yes. But it is also much more: a huge pool of computers run with automation, shared safely among millions of customers, and rented by the second. That is a very different thing from owning one machine.
Q2Which is cheapest: IaaS, PaaS, or SaaS?
It depends on what you count. IaaS has the lowest price per unit of raw power but the highest effort. SaaS has the highest price per unit but almost no effort. Count your team’s time, not just the invoice.
Q3Is Gmail IaaS, PaaS, or SaaS?
SaaS. You use a finished application through a browser or app, and Google runs everything underneath.
Q4Is AWS an IaaS or a PaaS?
Both, and more. EC2 and S3 are IaaS. Elastic Beanstalk is PaaS. Lambda is FaaS. Amazon WorkMail is SaaS. Big providers sell all the layers.
Q5Who is responsible if my data leaks?
It depends on the cause. If the provider’s own infrastructure fails, the provider is responsible. If you misconfigured sharing or lost a password, you are. Your data and your access settings are always your responsibility.
Q6What is vendor lock-in?
It means becoming so tied to one provider’s unique features that leaving is painful. It is not always bad, since unique features can be valuable, but it should be a deliberate choice.
Q7What does multi-tenant mean?
Many customers share one running copy of the software, while the system keeps each customer’s data separate. It is like many families living in one apartment building.
Q8Is serverless the same as PaaS?
They are close cousins. Both hide the servers. Serverless, or FaaS, goes further by running tiny pieces of code only when needed and billing per run, while a classic PaaS usually keeps your app running all the time.
Q9What is a private cloud?
Cloud technology used by only one organization, either in its own data center or in a dedicated section of a provider’s. It gives more control and isolation at a higher cost.
Q10Can I use all three together?
Yes, and most companies do. A single company might use SaaS for email and sales, PaaS for its website, and IaaS for a heavy data system.
Q11What is an SLA?
A service level agreement. It is a written promise about things like uptime, for example that the service will be available a stated percentage of the time, and what compensation you receive if the promise is broken.
Q12Where should I start learning?
Start by using SaaS tools thoughtfully, then try deploying a small web app on a PaaS, and finally create a virtual machine on an IaaS provider’s free tier and look at what you must manage. Experiencing all three teaches the differences faster than reading.

17Summary and Key Takeaways

The whole guide in a few lines.

Key Takeaways

  • Three layers, one promise. IaaS rents raw infrastructure, PaaS rents a ready platform, and SaaS rents a finished application.
  • More S means less work. As you move from IaaS to SaaS, you gain convenience and give up control.
  • Your data is always yours to protect. The shared responsibility model means the provider secures the cloud, and you secure what you put in it.
  • Sharing is the secret. Virtualization, containers, and multi-tenancy let many customers safely use the same machines and software.
  • Most breaches are misconfigurations. Strong logins, least-privilege access, encryption, and careful sharing settings prevent most problems.
  • Watch cost like a metric. Tag resources, set budgets, and switch off what you do not use.
  • Choose per job, not forever. Real companies like Netflix, Spotify, and Dropbox mix models and change them as they grow.