Tutorial code runs once. Production code runs forever. This article is about the gap between the two, and what real teams wish they had known on day one.
Observability first
Logs, metrics, and traces are not nice-to-haves. They are how you debug a 3am outage without paging the entire team. Wire them in on day one — adding them later is a multi-quarter project.
Failure modes the docs do not mention
- Cold start latency on serverless functions — mitigate with provisioned concurrency.
- Connection pool exhaustion when one downstream service slows — circuit breakers save you.
- Silent partial failures in batch jobs — always validate row counts at the end.
- Schema drift in upstream APIs — pin versions and add contract tests.
Rollback strategy
Every release should be reversible in under five minutes. If yours is not, fix that before the next feature. Blue/green, canary, feature flags — pick one and make it boring.
Summary
Production is where the work is. Spend at least as much time designing the rollback path as you do the rollout.