Cloud-Native Patterns
5 exercises — master the vocabulary of cloud-native design patterns: immutable infrastructure, circuit breaker states, sidecar architecture, bulkhead isolation, and declarative configuration.
0 / 5 completed
Cloud-native pattern vocabulary quick reference
- Immutable infrastructure — replace rather than patch; every change produces a new versioned artifact
- Circuit breaker — Closed (normal) → Open (tripped) → Half-open (probing) → Closed (recovered)
- Sidecar — a co-located helper container handling cross-cutting concerns independently from the app
- Bulkhead — isolated resource pools (threads, connections) so one slow consumer can't starve others
- Declarative config — specify desired state; a reconciliation loop converges actual state toward it
- Ambassador — a sidecar that proxies outbound calls (adds retry, circuit breaking, service discovery)
- Pets vs. cattle — cattle servers are replaced when broken; pets are named and individually maintained
1 / 5
An operations engineer says: "We never SSH into a running server to apply a hotfix — we build a new image with the patch baked in, re-deploy, and terminate the old instance."
Which cloud-native principle does this practice reflect?
Immutable infrastructure treats compute instances the same way container images are treated — as read-only artifacts you replace, not modify.
Mutable vs. immutable operations:
Why immutable infrastructure improves reliability:
• No configuration drift — every instance is identical to every other; every running server is the same as your last tested image
• Reproducibility — the image tag is the audit trail; you can deploy exactly the same artifact to any environment
• Fast rollback — deploy the previous image tag; no "undo" scripts needed
• Security compliance — no open SSH access to production; no manual changes outside the CI/CD pipeline
"Pets vs. cattle" explained (related concept):
• Pets — servers you name, nurture, and repair when sick (traditional ops model)
• Cattle — servers you number (web-01, web-02), and replace when sick; no individual attachment
Immutable infrastructure operationalises the "cattle" model at the infrastructure level.
Key vocabulary:
• Immutable infrastructure — a practice where deployed artifacts are never modified; changes require building and deploying a new version
• Configuration drift — divergence between the expected state of a server and its actual state after manual changes
• Golden image / AMI — a pre-baked, version-controlled machine image used as the base for all deployed instances
• Bake vs. fry — "baking" embeds config into the image at build time; "frying" applies config at boot time (Chef/Ansible) — immutable infrastructure prefers baking
Mutable vs. immutable operations:
| Approach | How changes are applied | Risks |
|---|---|---|
| Mutable | SSH in, run apt install, edit config files, restart services | Configuration drift; unauditable; hard to reproduce; "works on this server but not that one" |
| Immutable | Build new AMI/container image → deploy → drain old instances → terminate | Slightly longer deploy cycle; every change requires a full image build |
Why immutable infrastructure improves reliability:
• No configuration drift — every instance is identical to every other; every running server is the same as your last tested image
• Reproducibility — the image tag is the audit trail; you can deploy exactly the same artifact to any environment
• Fast rollback — deploy the previous image tag; no "undo" scripts needed
• Security compliance — no open SSH access to production; no manual changes outside the CI/CD pipeline
"Pets vs. cattle" explained (related concept):
• Pets — servers you name, nurture, and repair when sick (traditional ops model)
• Cattle — servers you number (web-01, web-02), and replace when sick; no individual attachment
Immutable infrastructure operationalises the "cattle" model at the infrastructure level.
Key vocabulary:
• Immutable infrastructure — a practice where deployed artifacts are never modified; changes require building and deploying a new version
• Configuration drift — divergence between the expected state of a server and its actual state after manual changes
• Golden image / AMI — a pre-baked, version-controlled machine image used as the base for all deployed instances
• Bake vs. fry — "baking" embeds config into the image at build time; "frying" applies config at boot time (Chef/Ansible) — immutable infrastructure prefers baking
Next up: GitOps Vocabulary →