Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

CloudSQL development and production setup

Hello,

I am interested in using Cloud Run and Cloud SQL for a project but I’m unsure how the workflow is structured, mainly when it comes to CloudSQL. I assume there will need to be two instances of CSQL, one for dev and the other for prod to allow both environments to closely mimic each other enabling a better debug experience when fixing something broken in prod. My concern is wouldn’t this become costly if you have a team of developers using this dev instance? If so is there an alternative to develop locally without the cost, while still having dev be a good representation of prod?

Solved Solved
0 2 1,203
1 ACCEPTED SOLUTION

Each developer certainly could be running a local database in their environment to point their local development too. But now you have X amount of possible unique environments at least down at the database layer. Is there anything in place to stop a developer from changing things? Such as what happens if one loads up a database patch but none of the others do and that patch happens to make their database perform different for the App needs?

If you had them developing locally then that would be a stronger need to have a Test/QA environment that mimics Production and you are right back at having more than one environment in the Cloud.  Because anything they do and check in you would want to make sure works before going into Production.  I guess it really boils down to how often are these developers going to be changing the database itself as to how much of a worry this becomes.

Now you could minimize costs depending on how often development is happening and changes are being pushed up.  It is not like the second Cloud based environment needs to be running at 100% capacity all the time, especially if it is a Test/QA environment and pushes to Prod are spaced out a good bit. You'd still incur some added costs when they are not testing since some things would still be running all the time but you could minimize the costs at least. Also, the Test/QA environment could remove another worry I have with your question in that should your developers be having access to production data?

View solution in original post

2 REPLIES 2

Each developer certainly could be running a local database in their environment to point their local development too. But now you have X amount of possible unique environments at least down at the database layer. Is there anything in place to stop a developer from changing things? Such as what happens if one loads up a database patch but none of the others do and that patch happens to make their database perform different for the App needs?

If you had them developing locally then that would be a stronger need to have a Test/QA environment that mimics Production and you are right back at having more than one environment in the Cloud.  Because anything they do and check in you would want to make sure works before going into Production.  I guess it really boils down to how often are these developers going to be changing the database itself as to how much of a worry this becomes.

Now you could minimize costs depending on how often development is happening and changes are being pushed up.  It is not like the second Cloud based environment needs to be running at 100% capacity all the time, especially if it is a Test/QA environment and pushes to Prod are spaced out a good bit. You'd still incur some added costs when they are not testing since some things would still be running all the time but you could minimize the costs at least. Also, the Test/QA environment could remove another worry I have with your question in that should your developers be having access to production data?

Hi Aaron!

Thank you for the elaborate response I understand the options better now. Having a local development setup allows data to get out of sync between developers and still does not overcome the problem of having an environment to Test/QA on which gives a valid representation of production since after all production is running in the cloud. This drove the point home 😁 Also the developers won’t have access to production data, I was essentially asking how to get a data instance with dummy data that can mock production but the answer as we discussed will be creating a Test/QA instance.

Thank you Aaron!