The production environment, usually just called production or "prod", is the live copy of a software system that real customers use, with real data. It is different from the other copies of the same system, where developers write the code and test it. Every change to the software is made and checked somewhere else first. Production is the last place it reaches.
Here is how it works in general. Most teams keep at least three environments. An environment is a complete set of servers, databases and settings on which the software runs. A server is a computer that runs programs for other computers. The development environment is usually the developer's own laptop, where the code is written. The test environment is a shared set of servers where automated tests run on every change. Staging is a near-exact copy of production, with the same settings but no real customers. Finally, the change is deployed to production. To deploy means to install a new version of the software on the servers and start it. A CI/CD pipeline usually does this automatically, taking the built version from an artifact registry.
Production has rules that the other environments do not. Few people are allowed to change it directly. Every change is recorded, so that it can be traced later. Real customer data stays there, and copies used for testing have names, phone numbers and account numbers removed or replaced, which is called data masking. Engineers watch production all day through observability tools, and one engineer is on call at night. If a new version causes errors, the team rolls it back, which means it reinstalls the previous version.
Take, for example, a mutual fund app that releases a new screen for buying funds. It first deploys the new version to 5% of its users, watches the error rate for an hour, and then deploys it to everyone. This is called a canary release.
Consider an online grocery company before a festival sale. It stops all deployments to production for three days, so that no new change can break the site while orders are at their highest.
Say a programmer at an insurance company needs to find a bug in claim payments. She tests the fix on staging, with masked copies of real claims, never on the live claims in production.
How is production different from staging? Staging is built to look like production, so that a change can be tried under the same settings. But staging has no real customers and no real money. Some problems appear only in production: the load of a lakh people at once, a rare kind of customer record, or a partner's system that behaves differently at night. That is why teams watch production closely after every deployment.
Appears in
- CI/CD pipeline↗ DevOpsA CI/CD pipeline builds and tests each approved change and then deploys it to production automatically, often many times a day.
- Observability platform↗ Observability and monitoringAn observability platform records what the production system is doing for real customers, and alerts an engineer when errors or response times rise.