Skip to content
Tutorials Center
My learning

Topics

Lesson 35 of 55 ยท Networks and the Internet

Cloud Computing Basics

Learn how public, private and hybrid clouds differ, what elasticity and regions mean, how pay-as-you-go pricing works, and compare costs with a Python model.

Almost every app on your phone talks to "the cloud", yet the word is rarely explained. In the previous overview of everyday services you saw that the cloud means computers owned by someone else, reached over the internet, and you met the three service levels SaaS, PaaS and IaaS. This lesson looks at the other questions people ask when they choose a cloud: who owns and shares the machines, how does it grow and shrink on demand, where are the data centers, and what does it cost?

Understanding these ideas helps you read a cloud provider's website, talk to an IT team and make sensible choices for a school, a small business or a personal project.

Where the machines live

Public cloud A provider shares its machines with many customers.
Private cloud Machines used by one organization only.
Hybrid cloud A mix of private and public.

Most large organizations end up with a hybrid setup.

1 / 2

Public, private and hybrid clouds

In a public cloud, a provider such as Amazon Web Services, Microsoft Azure or Google Cloud owns huge data centers and rents slices of them to anyone with a credit card. Your files or programs share the physical machines with other customers, but software keeps each customer's data separate. Public clouds are quick to start with and cheap for small or changing workloads.

A private cloud uses the same technologies but the machines are used by a single organization. They may sit in the company's own building or be reserved for it in someone else's. A hospital or a bank might choose this to keep full control over sensitive data or to meet legal rules. The price is that the organization buys and runs the hardware.

A hybrid cloud combines both: for example, customer records stay on private machines while the public website runs in a public cloud and borrows extra capacity during a busy sale. Some companies also use several public providers at once, which is called multi-cloud, to avoid depending on one company.

Elasticity: growing and shrinking

Imagine a ticket website. On a normal day it needs two servers. When tickets for a big concert go on sale, thousands of people arrive in minutes and it needs fifty. If the company owns its own servers it must buy fifty and let 48 sit idle most of the year. In the cloud it can rent more servers for the sale and release them afterward. This ability to match capacity to demand is elasticity. Adding servers is called scaling out; making one server bigger is scaling up. Automatic scaling rules, such as "add a server when the average load is above 70 percent", are called autoscaling.

Below is a small simulation of the hour-by-hour load of that ticket site. It compares a fixed fleet of 50 servers with an autoscaled fleet that is sized to demand. The price is made up for the example, at 0.10 per server per hour.

Python Fixed servers versus autoscaling

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The autoscaled fleet costs about one eighth as much. The fixed fleet of 50 only just survives the two peak hours (50 servers handle 5,000 requests per second, and the peak is 4,900), and for the rest of the day it sits almost idle. If the peak were 5,500, the fixed fleet would fail, while the autoscaled one would simply add servers. The trade-off is that autoscaling needs good rules and takes a little time to react.

Regions, availability zones and latency

Providers do not run one giant data center. They run many, grouped into regions (for example "Western Europe" or "US East"), and each region has several availability zones: separate buildings with their own power and network. Two choices follow:

  • Latency. Light in a cable takes time. A user in Australia talking to a server in Germany waits longer for every response than a user next door. Putting servers in a region near your users makes pages feel faster, and a CDN can serve copies of files even closer.
  • Resilience and the law. If a fire or power cut hits one zone, a service spread over two or three zones stays online. Some countries also require certain data to stay inside their borders, so the region you choose can be a legal decision.

How the pricing works

Cloud prices are usually pay as you go: you pay for the time a server runs, the amount of data stored, and often the data you send out. This turns a large up-front purchase (capital expense) into a running bill (operating expense). It is a good deal when your needs are small or unpredictable. For a steady, heavy load that runs all day, every day, renting can eventually cost more than owning, which is why some organizations keep such workloads on their own hardware.

Python Rent or buy: where is the break-even point?

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

For a server used two hours a day, renting stays cheaper for the whole decade. For one that runs around the clock, owning wins after about a year. The numbers are made up, but the shape of the answer is real.

Shared responsibility and risks

The provider looks after the buildings, power and physical machines. You still look after your own data, passwords and settings. Many cloud leaks come from a customer leaving a storage folder open to the public or reusing a weak password, not from a provider failure. Other risks are vendor lock-in (your system depends on one company's special features, which makes leaving hard), an outage at the provider, and surprise bills when something is left running. Good habits: use strong passwords with two-step sign-in (see Passwords, Hashing and Encryption), keep your own backups (see Backups and Recovery), and set a spending alert.

When you hear "serverless" or "containers", these are ways of using the cloud with less to manage. Servers still exist, but the provider starts and stops them for you as needed, and you pay only while your code runs.

Check your understanding

Quick check ยท 5 questions

of 5 answered You scored / 5 ยท perfect!

  1. 1. A hospital keeps patient records on machines used only by the hospital, and also uses a public provider for its public website. What is this setup called?

    A mix of private machines and public cloud services is a hybrid cloud.
  2. 2. What does elasticity mean in cloud computing?

    Elasticity lets you add resources for busy periods and release them afterward.
  3. 3. Why might a company choose a region close to its users?

    Shorter distance means less delay on every request and response.
  4. 4. Which situation favors owning hardware over renting cloud servers?

    Constant load makes renting accumulate cost over time, while irregular or small use favors pay as you go.
  5. 5. Who is usually responsible for a storage folder accidentally set to public?

    Under shared responsibility the provider secures the platform, but customers control their own settings and data.

Summary

  • Public clouds share a provider's machines among customers, private clouds serve one organization, and hybrid clouds combine both.
  • Elasticity and autoscaling match capacity to demand, saving money on spiky workloads.
  • Regions and availability zones affect latency, resilience and legal data location.
  • Pay-as-you-go suits small or changing needs; steady heavy loads can be cheaper to own.
  • Responsibility is shared: the provider runs the platform, you secure your data and settings.

Continue with Passwords, Hashing and Encryption.