General rule: The fewer environments a web app has, the better


General rule: The fewer environments a web app has, the better.

Why? Environments = overhead.

Environments are a sign of manual processes. They exist to support unpredictable, slow, manual checks.

The solution?
1. Automate checks
2. Continuously deploy

Clarification: Pre-prod environments aren't bad. But many pre-prod environments with manual checks often is.

Result:
More WIP
Fewer deploys
Slower feedback
Batching and management overhead

Summary: Robust automation + CD can eliminate the need for many pre-prod environments.
A related principle:

Treat environments like cattle, not pets.

Environments are ideally short-lived, created automatically for a specific purpose, and torn down automatically after a short period.

Example: Automatically deploy each branch to a separate URL to support review.

View original on X