In my past and current web development positions, Staging / Beta and Production / Stable environments have shared a database.
Here's my understanding of what is going on:
Staging / Beta is basically identical to Production / Stable's server(s), except the public at large cannot access Staging / Beta
Once QA's tests pass the upcoming iteration of code on its own sanitized subset copy of Production / Stable data, the next step in the development is to make sure that the upcoming iteration of code will work with the full set of Production / Stable data while not breaking the existing Production / Stable website - that's the purpose of Staging / Beta. Also, a company can let beta-testers test out the code using the same data which the world at large can see. Then, when the beta-testers give the thumbs up, it should be a simple switch from the older iteration to the newer iteration of code.
One of my direct reports called this a "smell". He suggests that Staging / Beta should have a full and complete copy of Production / Stable's database -- thus if there truly is a problem with Staging / Beta code which was not caught during QA, it won't affect the Production / Stable experience. That was the answer with these two links:
So here's my question: in what exact cases SHOULD Staging / Beta and Production / Stable share a database server? Or are my current and previous companies doing things wrong / being cheap / etc.?
Thank you in advance for your thoughts.
The staging environment must be isolated with no connections to any part of the production environment, including the production database.
A staging environment (stage) is a nearly exact replica of a production environment for software testing. Staging environments are made to test codes, builds, and updates to ensure quality under a production-like environment before application deployment.
It is recommended to separate the production environment from the QA and Test environments by using a user authentication system. This separation allows for complete isolation of data and different users can be given access to each environment.
The staging area contains the "next" version of the application and is used for final stress testing and client/manager approvals before going live. production: This is the currently released version of the application, accessible to the client/end users.
Sharing resources should only be done if you don't have enough resources :)
I have to agree with your direct report. A couple of issues you can run into, and they aren't too uncommon:
I really don't see how you can excuse not hosting staging/beta separately.
The goal seems to be:
I am in a similar environment, and I can't seem to find a documented development life cycle that allows for the above. I would say it is a cross between A/B Testing and "Canary Release Strategy".
We solved this with a fourth environment, between testing and production (we call it beta even though it is actually production):
Show stoppers should never make it to beta (in this context) since it is production, which is separate from staging/QA.
If you like this answer, maybe you can name the release cycle or deployment strategy after me :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With