Foundations: Linux, scripting, Git & networking
HTTP & status codes
HTTP status codes are the first signal in almost every web incident: a spike of 502s after a deploy, 504s at exactly 60 seconds, 403s from S3, 429s from an upstream API. For a DevOps engineer the important skill isn't memorising the list — it's knowing which component generated a code (CDN, load balancer, ingress, proxy, app) and what each code implies about the failure. This topic covers HTTP fundamentals, every status class with the codes that matter, a deep troubleshooting guide for 502/503/504 on AWS and Kubernetes, and how status codes feed monitoring, SLOs and retry policies.
After this topic you can
- Read HTTP requests, headers and status codes
- Tell a 502 from a 503 or 504 and know where to look
- Explain redirects, caching and how retries and SLOs use status codes
Lessons
-
1HTTP fundamentals
- Request and response anatomy
- Methods and their semantics
- Versions
- Headers that matter in operations
-
2The five classes, 1xx and 2xx
- Classes in ten seconds
- 1xx informational
- 2xx success
-
33xx redirection and caching
- Redirect codes
- 304 Not Modified
-
44xx client errors
- The codes you'll meet
- 401 vs 403 precisely
- 4xx and SLOs
-
55xx server errors and who generates them
- The codes
- Who generated the 5xx?
-
6Troubleshooting 502, 503 and 504 on AWS and Kubernetes
- 502 Bad Gateway
- 503 Service Unavailable
- 504 Gateway Timeout
- Reading ALB access logs
- A response playbook: "5xx spiking after a deploy"
-
7Kubernetes ingress and AWS service specifics
- Ingress returns 404 for a path that should work
- S3 returns 403 for a static site
- CloudFront 403/404 on SPA routes
- API Gateway quirks
- Health checks and redirects
- Liveness vs readiness endpoints
-
8Monitoring, SLOs, retries and API design
- What to alert on
- Retry policies
- Status codes in API design (what good looks like)
-
9Interview questions and model answers
- "Explain 502 vs 503 vs 504."
- "Users get 504 after exactly 60 seconds through an ALB. Why?"
- "Intermittent 502s behind an ALB with 'target closed connection'. Fix?"
- "401 vs 403?"
- "You see 502s spiking right after a deploy. What do you do?"
- "Should clients retry on 500?"
- "Why are 4xx errors often excluded from SLOs?"
- "What does a 499 in Nginx logs mean?"