Cloud Computing Fundamentals: Public, Private, Hybrid, IaaS, PaaS and SaaS

DevOps and Cloud Engineering: Complete Course from Beginner to Advanced · Cloud Computing Fundamentals · 7 min read · Updated

How much you manage

  1. IaaS gives you virtual machines. You install and look after the operating system and everything on it.
  2. With PaaS the provider also looks after the operating system and runtime. You manage your code and settings.
  3. With functions you only upload a piece of code. It runs when called and you pay for the run.
  4. SaaS is a finished product. You use it and manage only your data and users.

Before cloud computing, a company that wanted a website bought servers, put them in a room, connected cables, installed software and hired people to look after the machines. If the website became popular, the servers ran out of power, and ordering new ones took weeks. If it did not, the servers sat idle and the money was wasted. Cloud computing changes this: you rent computing power, storage and services over the internet from a provider, create them in minutes, and stop paying when you delete them.

Why do we need it?

Buying and running servers takes weeks and money up front. The cloud lets teams create what they need in minutes, pay for what they use and grow or shrink quickly.

A real-life example

Owning servers is like owning a car: you pay for it, insure it, repair it, even when it sits in the garage. Cloud is like using taxis or car sharing: you pay for the trips, and the company looks after the cars.

What cloud computing is

Cloud computing means using computing resources, such as servers, storage, databases, networks and software, that belong to a provider and are delivered over the internet, usually paid for by use. The provider owns and runs the buildings (data centres), the hardware and the basic software. You choose what you want and how much, with a web console, a command line or code.

Benefits

  • Speed: a server in minutes instead of weeks.
  • Pay for what you use: no big purchase up front. You pay for the time and the amount, though a badly managed account can still become expensive.
  • Scale up and down: add capacity for a busy day and remove it after.
  • Reach: run your service in many countries without building a data centre in each.
  • Managed services: the provider takes care of patches, backups and hardware for things like databases, so your team spends time on its own product.
  • Reliability tools: copies in several places, if you design for them.

Cloud deployment models

  • Public cloud: services are run by a provider such as AWS, Azure or Google Cloud and shared between many customers, with strong separation between them. It is the most common model.
  • Private cloud: the infrastructure is used by one organisation only, in its own data centre or hosted for it. It gives more control, and the organisation carries more of the work and cost.
  • Hybrid cloud: a mix of private systems and public cloud, joined together. A bank may keep sensitive records in its own data centre and use the public cloud for websites.
  • Multi-cloud: using more than one public cloud provider, to avoid depending on one, to use the best service of each, or because of company mergers. It adds complexity, so do not choose it only because it sounds safer.

IaaS, PaaS and SaaS

The three service models are about how much the provider manages for you. A pizza comparison is popular because it works. Making pizza at home means you do everything. Buying a frozen pizza means someone else made it and you bake it. Ordering a delivery means you only eat.

  • IaaS, Infrastructure as a Service: you rent the basic building blocks: virtual machines, disks and networks. You install and manage the operating system and everything above it. Examples: AWS EC2, Azure Virtual Machines, Google Compute Engine. Most control, most work.
  • PaaS, Platform as a Service: the provider also manages the operating system and runtime. You bring your code and settings. Examples: AWS Elastic Beanstalk, Azure App Service, Google App Engine and Cloud Run. Less control, less work.
  • SaaS, Software as a Service: a finished application that you use through a browser or app: Gmail, Google Docs, Microsoft 365, Slack. You manage only your data and users.

Between these, you will also hear FaaS, Function as a Service, or serverless functions such as AWS Lambda, where you upload a function and the provider runs it only when something calls it. The name serverless does not mean there are no servers. It means you do not manage them.

Virtualization, virtual machines and containers

Cloud providers run many customers on the same physical machines. They can do this safely because of virtualization: software called a hypervisor divides one physical machine into several virtual machines (VMs). Each VM has its own operating system, memory and disk, and cannot see the others. A VM behaves like a real computer, and takes about a minute to start.

Containers are lighter. Instead of a whole operating system for each one, containers share the host’s kernel and are separated by features of Linux. A container holds your application and what it needs, starts in a second or less, and uses much less memory. You will learn containers in depth in the Docker lessons. In short: a VM virtualizes the hardware, and a container virtualizes the operating system. Many systems use both: containers running inside VMs.

Architecture diagram

Here is the idea as a simple picture. You can use the same diagram in your own notes.

flowchart LR
  A[IaaS: virtual machines] --> B[PaaS: platform for your code]
  B --> C[Functions: run code on demand]
  C --> D[SaaS: finished software]
  A -. more control, more work .-> A
  D -. less control, less work .-> D

How to check it worked

  • You can explain IaaS, PaaS and SaaS using an example of each.
  • You can say the difference between hybrid and multi-cloud.
  • You can say how a container differs from a virtual machine in one sentence.

How companies use it

Companies host websites and apps, store data, run analytics and train models in the cloud. They combine managed services with their own code and often use containers.

Common errors and how to fix them

  • Unexpected bill. Set budget alerts and delete unused resources.
  • Resource not found. You are in the wrong region.
  • Cannot connect to a VM. Security group or key pair issue.
  • Service quota exceeded. Request a limit increase.
  • Public data leak. Check storage permissions and turn on blocking of public access.

Best practices

  • Turn on MFA for the root account.
  • Set billing alerts first.
  • Tag resources.
  • Delete practice resources.
  • Learn one provider well.

Interview questions with simple answers

  1. What is cloud computing? Renting computing resources over the internet and paying for use.
  2. IaaS vs PaaS vs SaaS? You manage more with IaaS, less with PaaS, nothing but your data with SaaS.
  3. What is hybrid cloud? A mix of private systems and public cloud.
  4. What is multi-cloud? Using more than one public provider.
  5. What is virtualization? Dividing one physical machine into several virtual ones.
  6. VM vs container? A VM has its own OS. Containers share the host kernel.
  7. What is serverless? Running code without managing servers; the provider scales it.
  8. What is elasticity? Automatic growing and shrinking with demand.
  9. Is cloud always cheaper? No, it depends on the workload and management.
  10. What is a hypervisor? Software that creates and runs virtual machines.

Practical exercises

Try each one yourself before you look at the hint. Struggling for a few minutes is how the skill sticks.

  1. List five services you use and label them IaaS, PaaS or SaaS. Hint: Think Gmail, Netflix.
  2. Describe a pay-per-use workload and a steady workload. Hint: A holiday sale vs a payroll system.
  3. Explain VM vs container with an apartment example. Hint: Separate houses vs shared building.
  4. Write the pros and cons of public vs private cloud. Hint: Cost, control, effort.
  5. Choose a model for a small blog and say why. Hint: PaaS or static hosting.

Mini project: Cloud decision note

Write a one-page note recommending IaaS, PaaS or functions for a small project of your choice, with cost, control and effort compared.

Knowledge test

Answer the ten questions in the quiz at the end of this lesson. You pass with 60 percent. If an answer is wrong, read the explanation, then reread the part of the lesson it points to.

Frequently asked questions

Is cloud always cheaper than my own servers?

No. It can be cheaper for variable workloads and for small teams, and more expensive for steady heavy workloads or when it is poorly managed. Calculate for your own case, and set budget alerts.

Is serverless really without servers?

No. Servers still exist, but the provider manages them. You do not provision, patch or scale them yourself.

Do I need to use multi-cloud?

Most teams do not. It adds cost and complexity. Consider it when you have a clear reason such as legal rules, a specific service or a business agreement.

Practise with interview questions