LearnFrenzy
Sign in Take a free test

Core Services · Lesson 3 of 6

Cloud Building Blocks: Compute, Storage, Databases and Networking

Almost every cloud architecture is built from the same few pieces. Learn virtual machines, object and block storage, managed databases, VPCs, load balancers and DNS — with the AWS, Azure and Google Cloud name for each.

12 min read Beginner Updated Nov 9, 2026 Reviewed by Saurabh Samir

Cloud consoles list hundreds of services, which scares beginners. Here is the secret: a typical web application uses about eight of them. Learn these building blocks and you can read most architecture diagrams — on any provider.

The name table

Building blockAWSAzureGoogle Cloud
Virtual machinesEC2Virtual MachinesCompute Engine
Object storageS3Blob StorageCloud Storage
Block storage (VM disks)EBSManaged DisksPersistent Disk
Managed relational databaseRDS / AuroraAzure SQL / Database for MySQL & PostgreSQLCloud SQL
NoSQL databaseDynamoDBCosmos DBFirestore / Bigtable
Private networkVPCVirtual Network (VNet)VPC
Load balancerElastic Load BalancingLoad Balancer / Application GatewayCloud Load Balancing
DNSRoute 53Azure DNSCloud DNS
CDNCloudFrontFront DoorCloud CDN

Compute: virtual machines and auto scaling

A virtual machine (VM) is a computer you rent: choose CPU, memory, operating system and disk, and it is running in a minute or two. You pay per second or hour while it runs.

  • Instance types balance CPU and memory differently — general purpose, compute-heavy, memory-heavy, GPU for AI.
  • Auto scaling adds VMs when CPU or traffic rises and removes them when it falls. You set the rules ("keep average CPU around 60%, between 2 and 20 servers").
  • Pricing options: on-demand (flexible), reserved or savings plans (cheaper for steady use, with a commitment) and spot/preemptible (very cheap, but can be taken back at short notice — good for batch jobs, not your database).

Storage: three different kinds

  • Object storage (S3, Blob, Cloud Storage) — files stored as objects in "buckets", accessed over HTTP. Practically unlimited and cheap. Perfect for images, videos, backups, logs and static websites. Not a disk you can install an OS on.
  • Block storage (EBS, Managed Disks) — a virtual hard disk attached to one VM. Fast; holds the OS and app data.
  • File storage (EFS, Azure Files, Filestore) — a shared network drive many servers can mount at once.

Keep buckets private by default. Serve public files through a CDN or signed URLs, and turn on the provider's "block public access" setting. An accidentally public bucket is one of the most common causes of cloud data leaks.

Databases: managed is the default

You can install MySQL on a VM, but then backups, patches, replication and failover are your job. A managed database (RDS, Azure SQL, Cloud SQL) handles those, with multi-AZ standby and point-in-time recovery a few clicks away. Use relational databases for structured data with relationships (orders, users, payments); NoSQL for very high scale, flexible documents or key-value lookups.

Networking: the parts every developer must know

  • VPC / VNet — your own private network inside the cloud, with an IP address range you choose.
  • Subnets — sections of the VPC. Public subnets can be reached from the internet (load balancers); private subnets cannot (databases, internal services).
  • Security groups / firewall rules — which traffic is allowed in and out of each resource. Rule of thumb: open only the ports you need, only to the sources that need them. The database accepts connections only from the app servers, never from the whole internet.
  • Load balancer — one entry point that spreads requests across healthy servers in multiple zones, and handles HTTPS certificates.
  • DNS — turns www.yourapp.in into the load balancer's address.

Putting it together: a classic web app

User → DNS (yourapp.in) → CDN (images, CSS, JS from object storage)
                       → Load balancer (public subnet, HTTPS)
                          → App servers in 2 zones (private subnets, auto scaling group)
                             → Managed database, multi-AZ (private subnet)
                             → Object storage (user uploads)

Read it from left to right and every arrow is a concept from this lesson. This exact shape — with different service names — runs a huge share of the web.

Design habit: nothing that stores data should have a public IP address. Only the load balancer (and the CDN) face the internet.

Try it yourself: Redraw the architecture above for a photo-sharing app for your college fest. Which parts must scale on fest day? Where do uploaded photos go? Which subnet does each piece belong in? Then write the AWS, Azure and Google Cloud names for every box.

Common interview questions

Try answering each one aloud before you open it.

1What is the difference between object storage and block storage?

Object storage keeps files as objects with metadata in buckets accessed over HTTP; it is highly scalable and cheap, ideal for media, backups and static sites. Block storage is a virtual disk attached to a VM for the OS and low-latency application data.

2What is a VPC and why use private subnets?

A VPC is an isolated virtual network in the cloud. Private subnets have no direct internet access, so sensitive resources like databases are reachable only from inside the network, reducing the attack surface.

3What does a load balancer do?

It receives incoming traffic and distributes it across multiple healthy servers, often in different availability zones, improving availability and scalability; it typically also terminates HTTPS and performs health checks.

Practise this

Build something with it

FAQs

Should I run my database on a VM or use a managed service?

Use a managed database unless you have a specific need. It handles backups, patching, failover and scaling that would otherwise take significant engineering effort.

What are spot instances good for?

Interruptible work like batch processing, data jobs, CI builds and some ML training, where saving a lot of money is worth the risk of the machine being reclaimed.

References & further reading

Finished this lesson?

Mark it complete. Create a free account to save it on every device.

Next lesson

Search LearnFrenzy

Esc

Quick links