What is a deployment environment?

Before we learn about different types of deployment environments we first need to know what is a deployment environment.

In short, a deployment environment is a collection of different configurations, libraries, and systems that enables the execution of software on a computer or server. You could think of the deployment environment as a controlled environment where your code lives and run.

What are the different types of deployment environments?

Every software starts off with a developer or a team of developers coding on their computer and then deploying it on a server in order to be used by other people.

So in general there are two main deployment environments, development and production. But some companies may have more than two deployment environments according to their needs and requirements.

In this tutorial, we will only take a look at the three most popular deployment environments which are the industry standard for medium and even large size software.

These three deployment environments are :

  1. Development environment (DEV)
  2. Staging environment also known as model (MODL)
  3. Production environment (PROD)

What is a development environment (DEV)?

This environment is the starting point of every software. A development environment is where the software is developed. Basically, it is a developer’s own machine. In this environment, you could install any library or dependency you like, and you could develop your software in any way you’d like to.

Most people use local or test databases in order to avoid costs. Some companies also have a central development environment, meaning that when several developers code a new update they will then push their changes to a central development environment, which is mostly private and not available to the outside world. Central development environments are mostly a single server to avoid extra costs.

In this diagram, you can see that developer’s computers are referred to as a local development environment, and a cloud server is referred to as a central development environment.

See also: Cloud hosting or dedicated servers at ServerMania

Development environment

What is a staging environment?

A staging environment is somewhat similar to a development environment, but its purpose is quite different. In this environment, developers deploy their code in the same manner they want their production application to be and they try to mimic the production environment as much as they can.

You could think of the staging environment as a mirror of the production environment. In this environment, developers use the same services and same configurations as the production environment but they most likely don’t connect their real data. Most of the people will also test some of their sensitive processes like database migrations and beta testing in this environment.

For most people staging environment is an environment where they put their newest updates and features in order to be confirmed by the directors, product manager, and stakeholders. It could also be used as a testing environment where they could invite testers privately or make it available publicly so that people could test their application.

In this diagram, you could see that the code is being deployed to a server which is our staging environment. After that people could access it and test the new features on this environment.

Staging Environment

Why staging environment?

To explain the usage of a staging environment, let’s first look at a common issue that could happen when you don’t have a staging environment.

Think if you have just finished implementing the newest features on your development environment and you then deploy it to your production servers. After a short time, you see that a bug appears in your production servers, thus causing your servers to go down. This is a really common problem and it may cost a business a lot. So to avoid this type of problem it is always recommended to have a staging environment to ensure your source code is bug-free and no faulty code goes through your production environment.

A staging environment may sometimes cost you a bit extra or may trouble you in some way but do keep in mind that all these troubles are really worth the time and effort. Without them, you may find yourself in a yet bigger problem in the future.

What is a production environment (PROD)?

This environment is the most sensible environment of all. It is in this environment that most businesses are able to do their work. The actual production environment should be kept always under control, monitoring, and developers should pay really high attention to it.

But, what does the production environment really mean?

The production environment is where you host and deploy the final version of your software in order for it to be accessed by users around the world. It could be a single server or multiple servers. This is the environment where you gain your real data from your end users. So try to optimize this environment as much as you can.

In the diagram below you could see that all the end users are connected to the production environment.

Production Environment

Production environment best practices

Since the production environment holds the highest importance on a software development journey, there are a few points to keep in mind in order to have a successful production environment, and those are as follows:

  1. Have high security in your production environmentAmong all the major issues, security is an unforgettable issue that you could have in your software. By having a low security on a production environment you are in a clear danger. Security issues could cause way more damage to your business than any other bug, so have the best possible security in place.
  2. Avoid rolling out to production without testing firstThe only reason that the staging environment exists, is to avoid the bug getting through to production. So try to use the staging environment as much as possible to prevent bugs from getting through your production and run numerous tests to make sure your application is flexible under different situations.

Sometimes there is no need for a staging environment

Now it may sound a bit weird because just then we told you to use the staging environment all the time, however when there are minor issuers such as a typo or a new line of code, then these types of updates have no point to put them on a staging environment first. That is why you could skip the staging environment for these types of issues. The staging environment itself is a big hassle indeed, you need to mirror the production environment, you have to make sure everything fits well and most of the time it will cost you a lot. In case you are running low on budget or your next update is not filled with a lot of features and code, then in this situation you are free to also skip the staging environment. But keep in mind if you are coding a lot of features, then you have to make sure you have a staging environment in place.

Other types of environments

Some companies have implemented their own rules regarding deployment environments. So the other most popular deployment environment are the test environments or also known as the QA environment (quality assurance) which plays a critical role in the software development process. In this environment, it is all about testing and experimenting. Developers run automated testing, unit testing, and continuous software testing.

A test environment is important in order to find a test failure and then fix them before deploying them to production. We could also use a test environment management to ease the process of testing and deploying new apps into a test.

The objectives of the test environment are:

  • Load testing
  • functional testing
  • feature testing
  • performance testing
  • user acceptance testing

This type of environment is really favored among enterprises and some medium-sized companies. But for the smaller applications, it might be a bit overkilling, since you need to put a lot of time and effort not just to test it but to also make a new environment and deploy your code in it.

Conclusion

Deployment environments are the building block of a successful cloud application, software, and web apps. By rightly using each deployment environment you can drastically improve the quality of your software.

These three deployment environments (development, staging, production) are the default environments of large and medium-sized applications. However, we could also use four (development, testing, staging, production) or more as well.

To recap what we have learned in this tutorial, we could say that every software or web application starts off at the computer of a developer. A developer’s computer environment is called a development environment.

The next deployment environment is the staging environment, it is a stage where we test and confirm the new features for deploying. We could also open a staging environment for beta testing as well. We could also have internal testing environments in between too. The last environment are the production environments. Every step that we have been taking all along was to put our application bug-free in this environment so that our end users can use the applications and the business could provide an efficient service to them.

All three deployment environments

Next step

Now that you have acquired some knowledge about deployment environments and what they are for, you can now design and manage cloud applications much more effectively. We also recommend you take a look at our latest articles and tutorial videos in the ServerMania Knowledge Base.