Production Architecture
Intermediate 15 min read Production Architecture

Production Platform Design

A paved road, not a custom sandbox

Design the platform your service runs on before the service: how compute, data, networking, and IaC come together as one environment that can be reproduced, patched, and operated without heroics.

platformenvironmentIaCreproducibilitypaved roadoperability
Before we start

What you will learn

  • Compose compute, data, networking, and IaC into one platform
  • Make environments reproducible from code
  • Design for operability from day one
In 60 seconds

A production platform is the shared, code-defined foundation: VPCs/networks, compute services, managed data stores, secrets, Logging, CI/CD. One repo that builds the skeleton, environment modules that vary it, and a paved-road default path so teams don't reinvent a broken pattern each time.

Introduction

What is this?

Platform layers: network (VPCs, subnets, gateways, DNS), compute (managed containers, serverless, VMs), data (managed DBs, storage, queues), and the operational surface (logging, metrics, tracing, alerts, secrets, budgets, bastion/zero-trust access). Everything is defined as code (Terraform/Pulumi/CDK), versioned, and deployed through the same pipeline as the app. Environments: prod, staging, dev are the same template with different variable sets (regions, sizes, protection), so the diff is configuration, not architecture. Paved road: pick ONE blessed pattern per concern — a standard service template with deploy, secrets, metrics, alerting, and rollback wired in — and make alternatives opt-in with review. Operability: runbooks for on-call, dashboards for the pager, perimeter and internal firewalls, cost allocation tags, and an owner contact for every resource group. The platform is a product: keep its lifecycle (upgrades, migrations, decommissioning) on a roadmap, with deprecation notices for legacy patterns.

Motivation

Why do you need it?

  • Reproducibility: the platform re-births from code; 'works on my machine' becomes 'deploys from the repo'.
  • Consistency: one paved road means training, tooling, and runbooks apply everywhere.
  • Operability: dashboards, alerts, and runbooks are built in, not bolted on after the incident.
  • Change safety: platform upgrades (K8s version, AMI, TLS) roll out through a versioned pipeline with staging first.
Think about it

Mental model

Imagine

Every team hand-building its own cabinet

Think of

Team-standardized cabs, pre-wired for power and data

The paved-road platform is the standardized wiring — teams plug in instead of re-plumbing.

Mechanics

How it works

  • Define the base network + account/organization structure as code.
  • Compose the standard service recipe: compute + secrets + LB + observability + alerts + deploy.
  • Parameterize environments (regions, sizes, protection, budget) off one template.
  • Route new services through the paved road; review off-road requests explicitly.
  • Operate the platform itself: upgrade it in staging, then apply everywhere.

The paved-road platform: one template, every environment.

Platform template
Environments
Services
Operate
Real world

In production

  • A 'service from template' button that provisions compute, secrets, DNS, monitoring, and CI in minutes.
  • Multi-account with SCPs/guardrails at the top, service accounts that can only reach their own scope.
  • Centralized logging + one query surface so 'which box did X at 03:00' is a query, not a chase.
Guidelines

Best practices

  • Environments share a template; only variables differ.
  • No manual drift: all infra changes go through the IaC pipeline.
  • Every environment has an owner and an expiry/decay plan.
  • Secrets live in the platform vault with least-privilege access roles.
Watch out

Common mistakes

  • Prod built by hand 'just this once', then never migrated to IaC.
  • Platform upgrades skipped because 'it works' — the drift becomes the incident.
  • Tool sprawl: per-team Logging/metrics/secret systems instead of one paved set.
When things break

Debugging tips

  • Compare environments: a behavior different in prod vs staging is usually a platform-variable diff.
  • Re-run the tower from code in a throwaway env; if it's not reproducible, that's the bug.
Interviews

Interview checkpoint

Practice

Hands-on lab

Sketch Your Team's Paved Road
25 min · intermediate
In progress
Objectives
  • List the platform layers your services share
  • Write the one-page 'service from template' recipe
  • Define the off-road review rule

Sketch Your Team's Paved Road

25 min · intermediate

0/3 steps
0%
sandbox · Linux sandbox
$
Try these commands
Test yourself

Quick quiz

0/1
1

Prod differs from staging. First suspect?

Go deeper

Official documentation