← Course Index

The Production Mental Model

~20 min · Foundations · Module 1 of 9

Ref
Primary Source
Roadmap.sh — DevOps Roadmap

The visual landscape of everything in this course. Read it after this lesson to see the big picture and where each tool fits. roadmap.sh/devops →

The Gap Every Developer Hits

You know how to build things. You can write a Node.js API, a React frontend, connect a database. But when someone asks "how do you deploy this?"— there's a wall.

That wall is the gap between development and operations. This course exists to close it. Before we touch a single tool, you need a mental map of the territory.

⚠️ The trap

Most developers learn tools in isolation — "I learned Docker," "I set up Nginx once." Without a mental model of how everything connects, you end up with a pile of half-understood commands and no idea why things break.

The Full Journey: Code → User

Every time a user loads your app, a chain of systems has to work perfectly. Here's the complete journey and where each tool in this course lives:

YOUR CODE Node.js app GitHub repo CI/CD GitHub Actions Test → Build → Push CONTAINER Docker image ECR / Docker Hub CLOUD (AWS) EC2 / ECS / S3 RDS · ElastiCache · SES EDGE LAYER Cloudflare CDN · WAF · DNS WEB SERVER Nginx Reverse proxy · SSL YOUR APP Node.js process Redis · RabbitMQ · DB USER Browser / Mobile sees your app request OBSERVABILITY Sentry (errors) UptimeRobot (uptime) CloudWatch (logs) GA4 + GSC (users/SEO) SECURITY HTTPS/TLS (Certbot) Cloudflare WAF IAM roles + secrets CSP + CORS headers
The complete journey from your code to your user — every layer this course covers

The 5 Layers You Must Own

1. Code → Deployable Artifact

Your code needs to be packaged into something that can run anywhere reliably. That's what Docker solves — it bundles your app and all its dependencies into a single image. GitHub Actions automates the process of building, testing, and pushing that image on every commit.

2. The Server

Something needs to run your Docker container. On AWS, that's usually EC2 (a virtual machine you control) or ECS/Fargate (managed containers). In front of it sits Nginx — the web server that receives HTTP requests, handles SSL, and proxies them to your app.

3. The Edge

Cloudflare sits between the internet and your server. It handles DNS, serves static assets from 300+ global locations, and blocks malicious traffic before it ever reaches your server. Think of it as a force field + CDN + DNS all in one.

4. Infrastructure Services

Your app doesn't run alone. It needs:

5. Observability

Once live, you need to know what's happening. Sentry captures errors with full stack traces. CloudWatch stores logs. UptimeRobot pings your app every minute and alerts you if it goes down. GA4 + Search Console tell you about your users and search performance.

💡 The senior dev mindset

A junior dev thinks about "does the code work?" A senior dev thinks about "is the system healthy?" The difference is observability — knowing what's happening in production at all times.

What This Course Builds

By the end of this course you'll be able to take any Node.js app and:

  1. Containerize it with Docker
  2. Run it behind Nginx with HTTPS
  3. Deploy it to AWS automatically via GitHub Actions
  4. Put Cloudflare in front for CDN, DNS, and security
  5. Add Redis for caching and RabbitMQ for background jobs
  6. Set up monitoring, error tracking, and analytics
  7. Make it discoverable via SEO
  8. Know exactly what to do when it breaks at 3am

Check Your Understanding

1. A user types your URL into their browser. Which layer intercepts the request FIRST?
2. Which tool is responsible for packaging your app and all its dependencies into a portable artifact?
3. Your app needs to send welcome emails when users sign up — but email delivery is slow and you don't want it blocking the HTTP response. Which tool handles this?
4. Your site goes down at 2am. You find out 40 minutes later because a user tweeted at you. What layer of the mental model was missing?