Infrastructure, CI/CD, and Deployment
Reproducible environments, safe containers, automated releases, scaling controls, and cost visibility
Environments and Configuration
Keep development, test, staging, and production isolated, with deliberate configuration differences.
How to apply it
Validate required configuration at startup; document variables and rotation. Keep public frontend config separate from server secrets. Use infrastructure as code and least-privilege roles; prefer short-lived CI credentials where supported.
Worked example
Fail startup if a required database URL is missing rather than failing on the first customer request.
Common mistakes to avoid
Sharing production data with tests or committing environment secrets.
Practice task
Implement this concept in the capstone. Add one positive test, one negative or failure-path test, and a short note explaining the trade-off you chose.
- Keep development, test, staging, and production isolated, with deliberate configuration differences.
- Validate required configuration at startup; document variables and rotation.
What is the strongest production practice for Environments and Configuration?
Containers, Health Checks, and Shutdown
Container images package code and runtime dependencies but should not contain production secrets.
How to apply it
Use supported base images, deterministic dependency installation, non-root execution, small build context, and scans. Separate readiness from liveness; gracefully stop traffic and handle in-flight work during shutdown.
Worked example
Readiness verifies serving capability; liveness detects a stuck process without depending on every external provider.
Common mistakes to avoid
Restart storms during provider outages or copying secrets into images.
Practice task
Implement this concept in the capstone. Add one positive test, one negative or failure-path test, and a short note explaining the trade-off you chose.
- Container images package code and runtime dependencies but should not contain production secrets.
- Use supported base images, deterministic dependency installation, non-root execution, small build context, and scans.
What is the strongest production practice for Containers, Health Checks, and Shutdown?
CI/CD, Scaling, and Cost Management
Automate lint, type checks, tests, security checks, and build verification; promote the same immutable artifact across environments.
How to apply it
Use backward-compatible database changes, canary/rolling releases, and predefined rollback signals. Load-test realistic traffic. Track latency, errors, queue depth, database saturation, and cost per active organization. Set budgets, tags, quotas, and retention controls.
Worked example
Send a small fraction of traffic to a canary version and stop rollout when error or latency thresholds are crossed.
Common mistakes to avoid
Scaling without measurements or allowing unbounded queues and cloud spend.
Practice task
Implement this concept in the capstone. Add one positive test, one negative or failure-path test, and a short note explaining the trade-off you chose.
- Automate lint, type checks, tests, security checks, and build verification; promote the same immutable artifact across environments.
- Use backward-compatible database changes, canary/rolling releases, and predefined rollback signals.
What is the strongest production practice for CI/CD, Scaling, and Cost Management?