What is a Stack Mode?

When you create a web application using RunCloud, you have the option to choose between different stack modes, i.e. the Development mode and Production mode.

These modes are two settings that affect how your Web Application behaves on RunCloud.

Here are the main differences between the two:

  • Development mode will write access logs as soon as possible, and disable log buffering. This means that every request to your site will be logged immediately and no files will be stored in the memory.

    This is useful for debugging and testing purposes, as you can see the latest changes and errors on your site without clearing the memory.
  • Production mode will buffer access logs before writing them, and enable log buffering. This means that the requests to your site will be grouped and written to the logs periodically, and some files will be stored in the memory for faster delivery.

    This is useful for improving the performance and security of your site, as it reduces the disk I/O and bandwidth usage, and makes your site load faster for your visitors.

Sometimes, you may prefer to deploy the website or application using the development stack before the official release. The flexibility to change stack mode allows you to test the website in a real production environment, simulating the conditions that the site will eventually encounter when it goes live. 

How to Change Stack Mode

On RunCloud, you can initially specify the stack mode when creating a web application. This setting is present under the “Basic settings and Stack” section. You can click on the drop-down menu and select your desired stack.

Specifying Stack mode on RunCloud dashboard

If you have already created your Web Application, you can switch between Development mode and Production mode from the RunCloud dashboard by clicking on the “Settings” button in the left menu.

Scroll down to the “Stack” section and pick your desired setting from the drop-down.

Finally, click on the “Update Stack” to save the changes.

Changing stack mode on RunCloud dashboard

Note: You should use Development mode only when you need to debug or test something on your site, and switch back to Production mode when you are done. Development mode is not recommended for live sites, as it can affect the speed and performance of your site.

Development vs Staging Environments

One of the common challenges in building a Web Application is to ensure that the system works well in different environments and scenarios. For example, a web application may work well with one version of a plugin, but may break with another version.

To avoid these issues, it’s important to test the software product or system in different environments and scenarios before releasing it to the end users.

This is where Development mode and Staging mode come in handy.

Development mode and Staging mode are two different features of RunCloud that allow you to test your applications.

Development Mode

Development mode is useful for debugging and testing purposes, as you can see the latest changes and errors on your web application without clearing the memory or restarting the server.

It can be used for testing features or functionalities that depend on the live server settings or configurations.

Staging Environment

The Staging environment is a copy of your live web application on a different subdomain, such as staging.yoursite.com. You can use the Staging mode to test new features, plugins, themes, or updates within a separate environment, without affecting your live web application.

A Staging environment is different from Development mode, as it creates a new app with its own database, files, and settings. You can sync your changes between your live web application and your staging web application using the RunCloud Hub plugin.

The Staging environment has some advantages over Development mode:

  • The Staging environment allows you to test your web application in an environment that mimics your live server as much as possible.
  • The Staging environment allows you to test your web application in an environment that is isolated from other factors that may influence its behavior.

The Staging environment and Development mode solve different problems. They are not mutually exclusive, and can be used together.