Tech

Cloud and infrastructure

Run services that stay up and stay affordable: containers and probes, canary and blue-green releases, zones and recovery targets, the networking basics, and cloud bills worked out before they arrive.

Read first: System design

7 concepts8 min read25-question test, from a bank of 33Updated

Concept 1 of 71 min

Availability targets, error budgets and observability

The rule
An availability target allows (1 − target) × the minutes in the period of downtime, and an error budget used up early shifts SRE (site reliability engineering) effort to reliability.
Worked examples

An error budget

Given
Target99.95%
Allowed down0.05%
Minutes a month43,200
Minutes a year525,600
  1. Month = 43,200 × 0.0005 = 21.6 minutes
  2. Year = 525,600 × 0.0005 = 262.8

About 4.4 hours of downtime a year is all the target allows.

Average against p99

Given
99 checkouts300 ms each
1 checkout9,000 ms
  1. Fast part = 0.99 × 300 = 297
  2. Slow part = 0.01 × 9,000 = 90
  3. Average = 297 + 90 = 387 ms

The average hides the 9-second wait that p99 shows.

The picture
Formula
Downtime allowed=(1 − availability) × minutes
30 days=43,200 minutes
1 year=525,600 minutes
Why it holds

That effort comes from releases. The 99th-percentile latency shows the slow tail that averages hide, distributed tracing times each hop of a request across services, and a rarely called serverless function pays a cold start.

A 30-day month has 43,200 minutes and a year 525,600, so each extra nine cuts the allowance tenfold. The error budget links release speed to reliability: raising the target or lowering it to free budget dodges the point.

The slowest 1% of requests are often the busiest users or the largest orders. CPU (central processing unit) graphs and access logs show servers, not the path of one request; a trace's spans make the slow hop stand out.

After idle time the platform starts a fresh environment and loads the code; warm instances or lighter runtimes reduce it.

Watch out
  • Confusing the monthly and the yearly downtime allowance.
  • Moving the target when the error budget runs out.
  • Judging latency on the average.
In the interview
  1. A trading platform promises clients 99.9% availability. How would you set up the team to keep that promise?

    A complete answer covers

    • Turn it into an error budget: about 43 minutes a month.
    • Measure availability from the client's side, with alerts on the budget burn rate.
    • Freeze risky releases when the budget is spent.
    • Track tail latency and tracing to find problems before outages.

Also in our technical interviews, on camera, with a score.

Concept 2 of 71 min

Containers, probes, autoscaling and limits

The rule
A container starts in seconds because it shares the host's kernel, and a readiness probe holds traffic until a pod is ready.

The why, the charts, the worked example and the interview questions are in Essentials, with every quiz.

See the plansSign in

Concept 3 of 71 min

Canary and blue-green releases, code and secrets

The rule
A canary release sends a small share of traffic to the new version and widens step by step while errors stay low.

The why, the charts, the worked example and the interview questions are in Essentials, with every quiz.

See the plansSign in

Concept 4 of 71 min

Zones, recovery targets, distance and scaling out

The rule
Replicas across availability zones survive the loss of one data centre, and an untested recovery plan is likely to fail.

The why, the charts, the worked example and the interview questions are in Essentials, with every quiz.

See the plansSign in

Concept 5 of 71 min

Networking basics: layers, DNS, subnets and UDP

The rule
Routing by URL (uniform resource locator) path needs a layer 7 HTTP (Hypertext Transfer Protocol) load balancer, since a layer 4 one sees only addresses and ports.

The why, the charts, the worked example and the interview questions are in Essentials, with every quiz.

See the plansSign in

Concept 6 of 71 min

Storage choices and cloud costs

The rule
Millions of files served over HTTP belong in object storage such as S3, and data sent out of the cloud is billed per GB.

The why, the charts, the worked example and the interview questions are in Essentials, with every quiz.

See the plansSign in

Concept 7 of 71 min

AdvancedBuying capacity in layers: commit the base, scale the peak

The rule
Capacity should be bought in layers: commit at a discount for the all-day base load and autoscale on-demand instances for the peaks.

The why, the charts, the worked example and the interview questions are in Essentials, with every quiz.

See the plansSign in

Recap

  • Downtime allowed = (1 − availability) × minutes in the period; a spent error budget pauses risky releases.
  • Containers share the host kernel and lose their disk on redeploy; readiness gates traffic, liveness restarts; set memory limits.
  • Canary exposes a few users first; blue-green rolls back by switching traffic; changes live in code, secrets in a manager.
  • Spread replicas across zones and test failover; recovery point = data lost, recovery time = time down.
  • Price the cloud per hour × 8,760, egress per GB, and rebuild only what changed.
Now test it

25 questions on Cloud and infrastructure

Timed, like the real one, drawn from a bank of 33. Every answer explained.

Test yourself →