Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it bad to have your test and production environments on the same machine?

Would it be bad to have things set up so that MySite.com is production and test.MySite.com is test? Both running off the same machine. The site doesn't get a lot of traffic.

UPDATE

I am talking about an ASP.NET web application running on a Windows server.

like image 768
Abe Miessler Avatar asked Dec 14 '10 16:12

Abe Miessler


People also ask

Why do we need a separate operational environment and a test environment?

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.

What is the relation between the test and production environments?

A QA environment is where you test your upgrade procedure against data, hardware, and software that closely simulate the Production environment and where you allow intended users to test the resulting Waveset application. A Production environment is where the Waveset application is actually available for business use.

Should tests run on production environment?

By testing your product quality in the production environment, there is a large amount of risk. Your customer may come across issues, churn, or simply write off your software as buggy. That's why companies who test in production need to have the ability to take risks, and not suffer hugely if they go wrong.

What is the risk of using production data for testing?

Risk of using production data for testing In fact, it can be very risky to just copy production data to a test environment because of possible privacy sensitive or personally identifiable information. When your systems contain personal data, you need to keep data protection in mind.


4 Answers

Yes, it is a bad idea.

Suppose your test code has a bug that consumes all memory/cpu/disk space? Then your production site goes down.

Have separate machines for production and test and use DNS to point the URLs to each.


Edit (more points):

If the sites share a machine, they share an IP address, so when using an IP address to access a site, you will not know whether you are on production or test.

When sharing the same machine, deployment can be tricky, you have to be extra careful not to deploy untested code to production (easier to do, since both live on the same machine).

The security considerations for production and test should be separate - this kind of setup makes it more difficult.

like image 152
Oded Avatar answered Nov 15 '22 09:11

Oded


It'd be really hard to test whether environment updates (new version of php/perl/python/apache/kernel/whatever) with test and production on the same machine.

like image 37
user542164 Avatar answered Nov 15 '22 10:11

user542164


It is a bad idea. When you have a new untested feature it may kill the production site.

like image 41
khachik Avatar answered Nov 15 '22 10:11

khachik


Is compliance with any kind of standard an issue? Generally you want developers to have lots of access to test environments so they can resolve issues. However, it's not always a good idea (or even allowed) for developers to have the same level of access to production systems.

like image 31
David Avatar answered Nov 15 '22 09:11

David