PR

Production Readiness

Best practices for production-grade code

Details

Language / Topic
nixNix
Category
Architecture

Rules

balanced
- Handle edge cases and failures gracefully — never assume the happy path.
- Add structured logging for all critical operations and error states.
- Use health check endpoints (`/healthz`, `/readyz`) for load balancers and orchestrators to verify service availability.
- Validate all external inputs at system boundaries. Trust nothing from users, APIs, or files.
- Add health check endpoints and readiness probes for all services.
- Use feature flags for risky rollouts — deploy dark, enable incrementally.
- Write code that fails loudly in development and recovers gracefully in production.