Hacker News new | ask | show | jobs
by stestagg 2812 days ago
I think most of the positive statements across this thread are generally correct, and most of the negative statements show a lack of awareness/inexperience:

My experiences are:

1. Staging environments are typically imperfect and have issues

2. Staging environments often help with product stability despite (1.)

3. Having staging envs is common, and could be considered standard in many companies, but..

4. Staging environments are a cost-benefit trade-off and should be considered on a product-by-product case.

5. CI and Unit testing are also common approaches to increasing product stability, and should be subjected to the same cost-benefit analysis per-product (yes, even unit tests), It's not an either-or with staging environments

6. staging envs should be prod-1 but often they end up being (prod-1 + some workarounds + some cruft left over from a failed deployment + other noise) over time.

7. Running a fully prod-equivalent staging environment can be prohibitively expensive (exact replica of prod configuration including infrastructure, realistic copies of prod data at volume, etc..) so usually some compromises are made to give a best-effort simulation of prod (fewer resources, etc..).

8. 'Battle testing' in staging is not always done, it's not uncommon for staging to be largely not looked at, except for whatever automated testing/alerting is running in that environment

9. It's ok for staging environments to test multiple changes at once, the typical intent of a staging area is to identify the presence of problems before they hit prod. The debugging & isolation of what caused problems is a secondary issue.

Your experiences may differ from the above, but they still stand

[edit: formatting]

1 comments

Good points. Your description is largely similar to my own experiences. On number #6, do you mean that the code base deviates from what is in production? IMO if staging has deviated from production then your pipeline is broken. There is not a single piece of staging specific code in our app. Whatever works on staging works on production. This is accomplished with ENV variables instead of hard coded environment specific details. We actually push directly from staging into production.
> On number #6, do you mean that the code base deviates from what is in production? IMO if staging has deviated from production then your pipeline is broken.

I'm not the person you're replying to, but in my experience, this only happens if you get 100% buy in to the dev ops approach. If you get less than 100% buy in, you'll often end up with greasy environments with the extreme end being a founder type writing code directly in prod.