Outcome
By the end of this lesson, you will be able to explain what dev, staging and production environments are for, and say why the non-production copies are often a large share of the bill.
| Prerequisites | I.3 |
| Time | 7 minutes |
1. Concept
Most teams do not run one copy of their system. They run several. Each copy is called an environment.
A restaurant offers a good picture. There is the dining room, where real customers eat. There is a test kitchen, where chefs try new dishes. And there may be a rehearsal before a big event, where the full menu is cooked once, exactly as it will be served. Software teams do the same thing with their systems.
The usual three
Development (dev). Where engineers build and try out changes. It breaks often, and that is fine. Many teams have several dev environments, sometimes one per engineer.
Staging. A rehearsal copy that is set up to look as much like the real thing as possible. Changes are tested here before customers see them.
Production (prod). The real system that customers use. It must stay up, so it usually gets the most care, the largest machines and copies in more than one zone.
Some companies add more: a QA environment for testers, a demo environment for sales, or a performance environment for load tests. The names vary. The idea is the same.
Everything that is not production is often called non-production or non-prod.
Why this matters for cost
Every environment is made of rented resources, and every one of them has a meter running. Three points follow.
- Copies multiply the bill. If staging is a full copy of production, it can cost nearly as much as production.
- Non-prod is often used only in working hours. Engineers and testers work during the day, but the machines are often left on all night and all weekend.
- Non-prod gets less attention. Nobody is woken up when a dev machine is idle. So it is where forgotten resources pile up.
A week has 168 hours. A typical working week is about 50 of them. A non-production machine left on all week is often unused for more than two thirds of the time it is paid for.
2. Worked example
A team runs three environments. Illustrative monthly costs, everything left on all the time (730 hours):
| Environment | Machines | Illustrative cost per machine per month | Monthly cost |
|---|---|---|---|
| Production | 10 | $100 | $1,000 |
| Staging | 6 | $100 | $600 |
| Dev | 8 | $100 | $800 |
| Total | 24 | $2,400 |
Non-prod (staging plus dev) is $1,400: more than half the bill.
Now suppose staging and dev were switched on only during working hours, about 220 hours a month instead of 730. Each non-prod machine would cost $100 x 220 / 730, roughly $30. The 14 non-prod machines would cost about $420 instead of $1,400, saving about $980 a month, with nothing changed in production.
All prices are illustrative. The pattern holds widely: non-production running at night is one of the most common causes of avoidable cloud cost.
3. Hands-on (5 min: no account needed)
1. Draw three columns: Dev, Staging, Prod.2. For a system you know (or an imaginary online shop), list in each column what it needs: machines, a database, storage.3. Mark which columns need to run at night and at weekends.4. Count how many of the 168 hours in a week each column really needs.Most people find that only production truly needs all 168. That gap is where scheduling non-production resources to switch off out of hours comes from.
4. Knowledge check
Q1
What is a staging environment?
A. The live system that customers use every day
B. A rehearsal copy set up to look like production
C. A place where old data is archived for years
D. The billing page in the cloud console
Show answer
Correct: B. Staging is a rehearsal copy where changes are tested before customers see them. A describes production.
Q2
Why is non-production often a large share of the bill?
A. Providers charge a premium for non-production resources
B. Non-production can only run in the most expensive regions
C. It is often several copies, left on at night and at weekends
D. Non-production resources cannot be switched off at all
Show answer
Correct: C. There are often several non-prod copies, and they tend to run all week while only being used in working hours. Providers do not price non-prod differently, and it can be switched off.
Q3
About how many of the 168 hours in a week are typical working hours?
A. About 50
B. About 10
C. About 120
D. All 168
Show answer
Correct: A. Roughly 10 hours a day for 5 days is about 50 hours. That is why non-prod left on all week is idle for most of the time it is paid for.
5. Apply
When you see environment names on a bill or in resource names (dev, test, qa, staging, prod), group the cost by environment. Then ask one question about each non-production group: does it need to be on at night and at weekends?
Related lessons
- I.3 L2: Why the meter does not stop when nobody is using it
- L2, Accounts, projects and subscriptions (next)