2

I was wondering if there are any best practice recommendations on setting up databases in a dev environment versus a live environment with regards to configuration.

Should they be as similar as possible (preferably identical)? Or should the dev environment be purposefully under powered in order to push developers to write optimal queries?

This could be as simple in MySQL as setting query_cache_size and related values to lower when on the dev machine.

2 Answers 2

2

If cost is not the issue, then I would say that development should have the same specifications as production. Here are some reasons:

  1. If you want to replicate a performance issue or a bug that you see in production, you will not be able to get the exact scenario if the machines are not the same.
  2. If the servers are the same and you see an issue in production, but the same issue is not in development then you can narrow it down to some recent configuration change between the servers.
  3. Optimal code should be written regardless of a servers specifications. If a developer write bad code on faster servers she will still write bad code on slower servers.
  4. Good developers can write their code to harness the underlying hardware efficiently. They will be better off writing the code for the same specs that the code will be running on.
  5. Worst case scenario: you can use your development server when a disaster strikes your production server, although this should not be your DR strategy.
2

I'd say that not having in development/test environments one that matches production will be a bad bet.

I worked for a shop where we didn't have an environment that matched production, so we couldn't do many of the tests as we should. I'm not saying that each developer/tester should have an env identical to production, but at least one environment for all devs/testers. And for usual development any environment will do. Testing performance of the code should be mandatory, if not for all pieces of code, than at least for the most used ones (can use profiling tools to find out).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.