Tech, ExplainedCloud platforms and developer tools
Concept

Production environment

Where every change finally lands.

HOW IT WORKSA developer writesand runs thechange on a laptopAutomated testsrun on it in thetest environmentIt is tried onstaging, a copy of thelive systemIt is deployed toproduction, where realcustomers use itEngineers watchproduction and rollback if errors riseReal customers and real data meet only versions that have already passed every earlier check.HOW IT WORKSA developerwrites andruns thechange ona laptopAutomatedtests run onit in thetestenvironmentIt is triedon staging, acopy of thelive systemIt isdeployed toproduction,where realcustomersuse itEngineerswatchproductionand rollback iferrors riseReal customers and real data meet only versions that have already passed every earlier check.HOW IT WORKSA developer writes and runs the change ona laptop↓Automated tests run on itin the test environment↓It is tried on staging, a copy of thelive system↓It is deployed to production, where realcustomers use it↓Engineers watch production and roll backif errors riseReal customers and real data meet only versions that havealready passed every earlier check.
A change moves from the developer's laptop to the test environment, then to staging, a copy of the live system, and finally into production, where real customers use it and engineers watch it.
opens a page inside this one a page in the same scene a page in another scene a concept page a label only, with no page

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

Cloud platforms and developer tools
Tech, Explained is a part of ingrid.fyi. Every page explains one piece of technology in plain words.