You already know what problems the cloud solves. Now let's name the three main ways to host your infrastructure. Understanding their differences will allow you to make good decisions (and understand why many companies choose one or the other).

On-premise: "at my place"

On-premise (often abbreviated as on-prem) means that the servers are on your own premises and are yours. You buy the hardware, set it up, maintain it, and protect it.

Analogy: it's like owning a car. You buy it, pay for insurance, inspections, repairs, and the garage. In return, it's entirely yours and you do whatever you want with it.

When it makes sense:

  • You have very strict legal requirements that require data not to leave your premises.
  • You have already invested a lot in hardware and haven't amortized it yet.
  • You need total control over every physical component (very specific cases).

Drawbacks: everything we saw in subchapter 1.2 (initial investment, maintenance, slowness, etc.).

Cloud: "I rent what I need"

In the cloud model (public cloud), a provider like AWS, Azure, or Google Cloud owns the datacenters. You rent the capacity you need and pay per use.

Analogy: it's like using a taxi or car sharing. You don't buy the car; you pay for each ride. You don't worry about insurance, gas, or repairs.

When it makes sense:

  • New companies or projects that want to start quickly and cheaply.
  • Variable workloads (traffic spikes).
  • When you want to reach users in multiple countries without building datacenters.
  • When you prefer to focus on your product, not on maintaining hardware.

Drawbacks:

  • At very large scale and with constant use, it can be more expensive than having your own already amortized hardware.
  • You depend on an external provider (risk of vendor lock-in, which we will see later).

Hybrid: "the best of both worlds"

The hybrid model combines on-premise and cloud, connecting them to work together.

Analogy: you have your own car for daily use (on-premise) but rent a van on weekends when you move (cloud for the peaks).

When it makes sense:

  • A traditional company that already has its datacenter but wants to use the cloud for new projects or demand spikes.
  • Sensitive data that must stay at home, but applications that benefit from the scale of the cloud.
  • Gradual migrations: moving things to the cloud little by little, without a sudden jump.

Real example: A bank keeps its account database on-premise due to regulation, but runs its mobile app and website in the cloud to absorb usage spikes at the end of the month. Both worlds are connected by a secure private line.

Quick comparison

Aspect On-premise Cloud Hybrid
Who buys the hardware? You The provider Both
Initial investment High Almost none Medium
Speed to grow Slow (weeks) Fast (minutes) Mixed
Hardware maintenance Your team The provider Shared
Physical control Total Limited Partial
Global scale Difficult Easy Possible
Example use case Highly regulated data Startup, website with spikes Company in migration

An important nuance: public vs private cloud

When we say "cloud" in this book, we mean the public cloud: datacenters shared by many clients (although your resources are isolated). There is also the private cloud, which is basically cloud-like infrastructure but dedicated to a single organization (often on-premise). The hybrid model usually combines public cloud with on-premise or private cloud.

What you should remember

  • On-premise: you own the hardware. Maximum control, maximum responsibility.
  • Cloud: you rent capacity from a provider. Fast, flexible, pay-per-use.
  • Hybrid: you combine both, useful in migrations and when there is data that must stay at home.
  • There is no universally "better" option: it depends on the context (regulation, budget, workload type).

In the next subchapter, we will delve into the three cloud service models —IaaS, PaaS, and SaaS— that define how much work you delegate to the provider.

Cloud, AWS & Terraform — From Zero to Expert

Chapter 1 · What is cloud computing

Chapter 2 · The cloud market and major providers

Chapter 3 · Regions, availability zones and edge

Chapter 4 · Compute: EC2

Chapter 5 · Storage: S3

Chapter 6 · Networking: VPC

Chapter 7 · Identity and access: IAM

Chapter 8 · Managed databases

Chapter 9 · Why Infrastructure as Code

Chapter 10 · HCL: the Terraform language

Chapter 11 · Providers and state

Chapter 12 · Your first real infrastructure in Terraform

Chapter 13 · Load balancing and auto scaling

Chapter 14 · Serverless with Lambda

Chapter 15 · Messaging and events

Chapter 16 · Content delivery and DNS

Chapter 17 · Containers on AWS

Chapter 18 · Modules: reuse and composition

Chapter 19 · Workspaces and environment management

Chapter 20 · Remote backends and locking

Chapter 21 · Infrastructure testing

Chapter 22 · Terraform in CI/CD

Chapter 23 · Defense in depth

Chapter 24 · Observability: logs, metrics and traces

Chapter 25 · Cost optimization

Chapter 26 · High availability and disaster recovery

Chapter 27 · AWS Well-Architected Framework

Chapter 28 · Serverless architectures at scale

Chapter 29 · Data platforms on AWS

Chapter 30 · Multi-account and landing zones

Chapter 31 · Platform Engineering and Internal Developer Platform

Chapter 32 · Relevant AWS certifications

Chapter 33 · Projects to consolidate what you've learned

Chapter 34 · Resources and community

© Copyright 2024. All rights reserved