Home > Net >  Staging/Testing config on Cloud Spanner
Staging/Testing config on Cloud Spanner

Time:07-23

I usually have the following development branches:

  • Production (corresponding to the main server, such as www.example.com
  • Development/Staging (corresponding to a test server, such as test.example.com)
  • Local (the user will just use local resources, no server required)

I have a Cloud Spanner instance for Production, and for Local I use the Spanner Emulator.

What is the suggested best practice for the Development/Staging database? Is it considered bad practice to have a second database within the primary Instance, such as:

  • my-spanner-instance (Instance)
    • prod (Database)
    • dev (Database)

CodePudding user response:

First of all: There's not one correct answer to this, as it really depends on your specific needs and requirements.

But in general I would say:

  1. Having a shared instance for production and development/staging will save you some costs. It will however also mean that for example load from tests and experiments on the staging database could have an impact on your production environment.
  2. Having separate instances for production and development/staging would make the setup more like your traditional setup with a separate test server, as development/staging would physically and logically be separated from your production environment.

Although the analogy is not 1-on-1, when comparing your Cloud Spanner to setup to a more traditional setup using servers, the best comparison would be to consider a Cloud Spanner instance a 'server'. So if in a traditional setup you would always use a separate (virtual) server for your staging environment, then it would also make sense to do so in your Cloud Spanner setup.

  • Related