Leer en español · Lire en français · Auf Deutsch lesen
Chapter 10 of 12 · Intermediate to advanced
Cloud-Native and Infrastructure Architecture
Where and how software runs is now an architectural decision. This chapter covers cloud service and deployment models and the shared responsibility model, containers and Kubernetes, the twelve-factor app, infrastructure as code and GitOps, CI/CD pipelines and deployment strategies, multi-region design, disaster recovery and edge computing, platform engineering, and FinOps and vendor lock-in. It is for developers and architects who know the operational qualities of Chapter 9 and want to choose, justify and run the platforms their systems depend on, without being sold a stack.
Video introduction to Chapter 10
7 min · narrated, with captionsListen only (audio)
Read the transcript
Welcome to Chapter 10, Cloud-Native and Infrastructure Architecture. For most of the history of software, infrastructure came after the architecture: an operations team received a finished application and found servers to run it on. That separation has gone. Today the choice between virtual machines, containers, platforms and functions decides much of the cost. The number of availability zones and regions decides the availability. And the deployment pipeline decides how quickly and safely a team can change anything.
This chapter is for developers and architects who want to choose, justify and run the platforms their systems depend on, without being sold a stack. It builds on Chapter 0, which introduced servers, virtual machines, containers, cloud service models, regions and availability zones, and on Chapter 9, which explained how to make systems scale, degrade gracefully and stay observable. Here those ideas meet the platforms most systems now run on. Decisions about where and how software runs are expensive to reverse, they cut across every team, and they fix the quality attributes that Chapter 2 asked you to specify. And Chapter 11 follows, with how to judge an architecture, including its infrastructure, and how to change it safely over time.
The running example is the food delivery platform used throughout the course: customer and restaurant apps, an order service, menus, payments, courier dispatch, and a sharp evening rush. The first four sections are about the foundations. Section ten point one sets out who manages what, from infrastructure as a service, or IaaS, through PaaS and functions, to SaaS. Under the shared responsibility model, your data, identities and configuration are always your job. Section ten point two explains container images, the Kubernetes control plane and nodes, and the reconciliation loop at its heart. It is also honest about when Kubernetes is overkill. Section ten point three walks through all twelve factors of the twelve-factor app, with modern caveats, and shows how to audit an existing service against them. Section ten point four covers infrastructure as code: declarative tools, state and drift, modules, immutable infrastructure, GitOps, policy as code and testing.
The single most important idea in this chapter is declared desired state, continuously reconciled by automation. This diagram from Section ten point two shows how Kubernetes does it. You declare the desired state. Here, three replicas of version two point four of the orders service. A controller observes the actual state of the cluster, and finds only two pods running. It compares what it sees with what was declared, and finds one pod missing. So it acts, and asks for one new pod. The loop repeats on every change event, and periodically. Because it acts on the current difference, not on a remembered sequence of events, missed events and restarts do no lasting harm. The same idea runs through infrastructure code, GitOps, deployment pipelines and immutable infrastructure. A person changes a description, which is reviewed, versioned and auditable, and machines do the rest.
The second four sections are about change, scale, people and money. Section ten point five follows a change from commit to production through a CI/CD pipeline, compares rolling, blue-green, canary and shadow deployments, and separates deployment from release with feature flags. Section ten point six compares disaster recovery strategies, explains what replicating data across regions does to consistency, and covers cell-based architecture and edge functions. Section ten point seven treats the internal developer platform as a product, with golden paths and guardrails, and shows how to measure whether it helps. And Section ten point eight turns cost into an architectural quality, measured per order, and treats vendor lock-in as a trade-off to be priced rather than a sin to be avoided.
The second idea is that every option in this chapter is a trade-off. This diagram from Section ten point six shows four disaster recovery strategies side by side. Each is judged by two numbers that come from the business: the recovery time objective, or RTO, how long you may be down, and the recovery point objective, or RPO, how much data you may lose. With backup and restore, backups are copied to a recovery region where nothing runs. Recovery takes hours, and you lose everything since the last backup. With a pilot light, data is replicated but the application servers are off. With a warm standby, a small working copy already runs and scales up. Recovery time falls to tens of minutes, then to minutes. With active-active, a full second region is already serving traffic, and both numbers are near zero. Each step to the right buys faster recovery and less data loss, at a higher continuous cost and complexity. The right choice depends on the workload and the organisation.
By the end of the chapter, you will be able to compare the cloud service and deployment models, and assign the duties for a workload under the shared responsibility model. You will understand how Kubernetes maintains a declared desired state, and be able to judge when it is overkill. You will be able to choose between rolling, blue-green, canary and shadow deployments, and use feature flags to separate deployment from release. And you will be able to calculate unit costs, such as cost per order, and evaluate lock-in as a priced trade-off.
Each section can be read on its own, but the order is deliberate. You cannot reason about deployment strategies without knowing what Kubernetes does during a rollout. If you are new to operations, read the beginner boxes, and Chapter 0's section on servers and the cloud, first. Don't worry about memorising tool names. Products change every few years, while the mechanisms last. Vendors are named as examples, not recommendations. At the end of each section there are self-check questions. Answer them in your head before you look at the answers. Allow about three hours to read the whole chapter. When you are ready, there is an optional chapter test of about forty five minutes, with twenty multiple choice questions and two written answers. The pass mark is eighty per cent.
That is the shape of the chapter. Start with Section ten point one, on cloud service and deployment models, and who is responsible for what. See you there.
At a glance
You will learn to
- Compare IaaS, CaaS, PaaS, FaaS and SaaS and the deployment models, and assign duties for a workload under the shared responsibility model.
- Explain how Kubernetes maintains a declared desired state through its control plane, nodes and reconciliation loops, configure requests, limits and probes, and judge when Kubernetes is overkill.
- Audit an application against the twelve factors and the principles beyond them, and prioritise the fixes by risk.
- Design infrastructure code with remote state, locking, modules, environments, policy checks, tests and GitOps reconciliation.
- Choose a deployment strategy (rolling, blue-green, canary or shadow) and separate deployment from release with feature flags.
- Select a disaster recovery strategy from RTO, RPO and cost, and explain the consequences of replicating data across regions and moving work to the edge.
- Explain how an internal developer platform with golden paths reduces cognitive load, and how to measure whether it succeeds.
- Calculate unit costs such as cost per order, identify the architectural drivers of cloud cost and evaluate lock-in as a priced trade-off.
Before you start
Chapter 0, section 0.7 (servers and the cloud) and section 0.8 (how software gets built); Chapter 9, especially scaling, statelessness, SLOs and observability. Chapter 6 on distributed systems helps.
Time
About 3 hours to read; 45 minutes for the test.
Key terms
cloud native · shared responsibility model · availability zone · container image · Kubernetes · reconciliation loop · twelve-factor app · infrastructure as code · GitOps · canary release · RTO and RPO · golden path · FinOps · lock-in
Why infrastructure has become architecture
For most of the history of software, infrastructure was something that happened after the architecture: an operations team received a finished application and found servers to run it on. That separation has gone. In a modern system, the choice between virtual machines, containers, platforms and functions decides much of the cost; the number of availability zones and regions decides the availability; the deployment pipeline decides how quickly and safely a team can change anything; and the infrastructure itself is written as code, reviewed in pull requests and versioned with the application. Decisions about where and how software runs are now among the most significant an architect makes, in exactly the sense of Chapter 1: they are expensive to reverse, they cut across every team and they fix the quality attributes that Chapter 2 asked you to specify.
This chapter builds on two earlier ones. Chapter 0 introduced servers, virtual machines, containers, cloud service models, regions and availability zones (servers and the cloud). Chapter 9 explained how to make systems scale, degrade gracefully and stay observable (scaling strategies onwards). Here those ideas meet the platforms that most systems now run on. The running example is the food-delivery platform used throughout the course: customer and restaurant apps, an order service, menus, payments, courier dispatch and a sharp evening rush.
How the sections fit together
The first four sections are about the foundations. Cloud service and deployment models sets out who manages what under IaaS, containers as a service, PaaS, FaaS and SaaS, the shared responsibility model, the real reasons for private, hybrid and multi-cloud, what the CNCF means by cloud native, and when renting is not cheaper than owning. Containers and orchestration explains images and the OCI standards, the Kubernetes control plane and nodes, its core objects and the reconciliation loop at its heart, with real YAML, and is honest about when Kubernetes is overkill. The twelve-factor app walks through all twelve factors with modern caveats, the principles beyond them, and an audit of an existing service. Infrastructure as code covers declarative tools (Terraform, OpenTofu, CloudFormation, Bicep, Pulumi), state, drift, modules, immutable infrastructure, GitOps, policy as code and testing.
The second four sections are about change, scale, people and money. CI/CD pipelines and deployment strategies follows a change from commit to production, compares rolling, blue-green, canary and shadow deployments, and separates deployment from release with feature flags. Multi-region, disaster recovery and edge computing compares disaster recovery strategies by RTO, RPO and cost, explains the consistency consequences of replicating data across regions, and covers cell-based architecture and edge functions. Platform engineering treats the internal developer platform as a product with golden paths and guardrails, and shows how to measure whether it helps. FinOps, cost architecture and lock-in turns cost into an architectural quality, measured per order, and treats vendor lock-in as a trade-off to be priced rather than a sin to be avoided.
Each section can be read on its own, but the order is deliberate: you cannot reason about deployment strategies without knowing what Kubernetes does during a rollout, or about platform engineering without infrastructure code and pipelines to build the platform from.
One idea runs through every section
The single most important idea in this chapter is declared desired state, continuously reconciled by automation. Kubernetes keeps the number of running copies equal to the number you declared. Infrastructure code describes networks and databases, and a tool computes and applies the difference from what exists. GitOps keeps the cluster equal to what is in a Git repository. A deployment pipeline turns every change into the same tested, repeatable sequence of steps. Immutable infrastructure replaces rather than repairs. In each case a person changes a description, which is reviewed, versioned and auditable, and machines do the rest. This is what lets a small team operate a large system safely: change becomes routine, and recovery becomes a rerun rather than an act of heroism.
The second idea is that every option on this chapter's menu is a trade-off, and the right choice depends on the workload and the organisation. Kubernetes is excellent for many services and many teams and wasteful for three services and two developers. Multi-region active-active buys minutes of recovery time at a multiple of the cost. A platform team helps only if developers want what it builds. Cloud is cheapest for variable load and can be beaten by owned hardware for large, steady load. Lock-in is a cost to be weighed against the cost of portability. The chapter therefore gives you decision guides, worked examples with numbers and the arguments on both sides, rather than a single recommended stack.
How to use this chapter
Readers new to operations should read the beginner boxes and Chapter 0's section on servers and the cloud first, and should not worry about memorising tool names: products change every few years, while the mechanisms (reconciliation, immutability, state and drift, progressive delivery, recovery objectives, unit costs) last. Experienced engineers may want to start with the worked examples and the decision guides, then read the sections whose trade-offs they disagree with. Throughout, vendors such as AWS, Microsoft Azure, Google Cloud and Cloudflare are named as examples, not recommendations.
Chapter 11 follows with evaluation, governance and modernisation: how to judge an architecture, including its infrastructure, and how to change it safely over time.
The 8 sections
Chapter test
Test your understanding of Chapter 10
Optional: 20 multiple-choice questions and 2 short written answers, drawn afresh from a bank of 72 questions. Pass mark 80%. Passing every chapter test, then the final assessment, earns the Be Wise Certificate of Completion.
Take the Chapter 10 test in the appFurther reading
- The NIST Definition of Cloud Computing (SP 800-145), Peter Mell and Timothy Grance (2011), National Institute of Standards and Technology. The short, widely cited definition of the essential characteristics, service models and deployment models.
- The Twelve-Factor App, Adam Wiggins (2011), 12factor.net (Heroku; community-maintained since 2024). Twelve concise practices for deployable, scalable applications; still the common vocabulary of cloud-native application design.
- Kubernetes: Up and Running (3rd edition), Brendan Burns, Joe Beda, Kelsey Hightower and Lachlan Evenson (2022), O'Reilly Media. A clear introduction to Kubernetes objects and operations by people who helped create it.
- Infrastructure as Code (3rd edition), Kief Morris (2025), O'Reilly Media. The standard book on designing, testing and delivering infrastructure code, independent of any one tool.
- Continuous Delivery, Jez Humble and David Farley (2010), Addison-Wesley. The foundational text on deployment pipelines, build once deploy many, and making releases routine.
- Accelerate: The Science of Lean Software and DevOps, Nicole Forsgren, Jez Humble and Gene Kim (2018), IT Revolution. The research behind the DORA metrics, linking delivery practices and loosely coupled architecture to organisational performance.
- Site Reliability Engineering: How Google Runs Production Systems, Betsy Beyer, Chris Jones, Jennifer Petoff and Niall Richard Murphy (eds) (2016), O'Reilly Media (free online). How a large operator runs systems with automation, error budgets and release engineering.
- Don't get locked up into avoiding lock-in, Gregor Hohpe (2019), martinfowler.com. A balanced analysis of the kinds of lock-in and the real cost of avoiding them.