Staging and production in Version Control System

Explained staging and production area

Staging and production in Version Control System

Staging vs Production: Development Environments Explained

Purpose of Development Environments: Every development team before releasing any new features or changes tests whether the new code is going to cause any bugs or not. To do so, at first, it goes under the staging environment where the code is tested and verified. A common practice is for teams to have a developer environment, a UAT or QA environment, and a staging environment. The main purpose of this flow is to find any potential issues that may arise due to changes or new features being added to the codebase.


Staging Environment:

It is made similar to the production environment where the goal is to test code in a similar environment as production mode. It is a virtual area.

Testing Scenarios:

  • Developers submitting new features along with feature flags for turning them on and off should always do a testing round in a staging environment. They allow teams to verify that the feature works, it can be turned on and off via configuration flags and also that it does not break or interfere with existing functionality.

    1. Testing: QA teams verify features, and configurations, and perform unit, integration, and performance testing.

    2. Migrations: Ideal for testing data migrations before applying changes to production.

    3. Configuration Changes: Allows detection of potential issues or bottlenecks.

  • Replication Challenges: May not be a replica due to cost or time constraints.

Production Environment:

Where the finalized and tested code is deployed for public use. Production is live. It's out there for people to see and/or interact with. Any issues or problems you may have had should have been caught and fixed in the staging environment. The staging area gives the team a safety net to catch these possible issues. Any code that is deployed to production should have been tested and verified before the deployment itself.

Risk Mitigation:

  1. Downtime: Any service downtime can impact revenue, making it crucial to catch issues in staging.

  2. Reputation Management: Downtime or issues in production can damage a company's reputation, leading to customer loss.

  3. Vulnerabilities: Security checks ensure updates or patches don't introduce vulnerabilities.


Key Considerations:

  • Testing Rigor: Staging provides a safety net to catch issues before deployment in the live production environment.

  • Downtime Impact: Downtime, especially for customer-facing services, can have financial implications and affect user experience.

  • Cyber-Security: Production releases should consider security implications to safeguard against vulnerabilities.

  • Reputation Management: Ensuring a reliable and issue-free production environment is crucial for maintaining user confidence and preventing customer loss.