Multi-region Cloud Storage charges

Viewed 870

I've read a few similar posts but haven't really understood why I am getting charged.

I recently (middle of May) switched from Python 2.7 environment with webapp2 to Python 3 with Flask. I switched from using old ndb to the new ndb. I am using Standard (not Flex) This application has very limited use and I thought was limited to a single region. The project size is 176.3 KB

At the end of the May the following was added to my bill:

Standard Storage US Multi-region 0D5D-6E23-4250 0.33 gibibyte month

I'm wondering why I have 'multi-region' anything. I thought I was set up for a single region. I never got billed for anything using Python 2.7 and webapp2 with old ndb. This application is small with limited use. When I delete the region bucket it just comes back when a new version is deployed. I thought there was a 5GB free use limit?

2 Answers

Could you please check the buckets in the Console Storage browser? When you create an app sometimes is created as well a bucket named multiregionName.artifacts.projectID.appspot.com. This bucket is Multi-region. You can check whether this bucket was created with the new versions you upgraded. If you check in the overview of the Bucket you can get the Creation time, Location-type and Location.

Also, according to GAE Default Cloud Storage bucket:

The Default Cloud Storage bucket has a free quota for daily usage as shown below. You create this free default bucket in the Google Cloud Console App Engine settings page for your project.

The following quotas apply specifically to use of the default bucket. See pricing for Cloud Storage Multi-Regional buckets for a description of these quotas.

In a nutshell, I would check the content of the multiregional bucket. If it has something investigate the actual usage and decide either to delete something or not.

Otherwise just calculate the estimated cost according to the pricing table and verify that is correct.

UPDATE

I created an GAE App and it created the following buckets:

  • joss-xxx.appspot.com
  • staging.joss-xxx.appspot.com Multiregion
  • us.artifacts.joss-xxx.appspot.com Multi-region

I tested deleting the buckets as you did and each time I deploy I get those three buckets again. So here the explanation:

joss-xxx.appspot.com is the default bucket for GAE, and has a 5GB free storage quota and is provided for your usage.

About the staging Bucket I found this (1) and this (2) which mentions:

  1. Note: When you create a default bucket, you also get a staging bucket with the same name except that staging. is prepended to it. You can use this staging bucket for temporary files used for staging and test purposes; it also has a 5 GB limit, but it is automatically emptied on a weekly basis.
  1. App Engine also creates a bucket that it uses for temporary storage when it deploys new versions of your app. This bucket, named staging.project-id.appspot.com, is for use by App Engine only. Apps can't interact with this bucket.

The artifacts bucket, {region}.artifacts.{app-id}.appspot.com is used to build the docker container that GAE Flexible deploys. Even when I deployed an Standard app, this bucket was created. Deleting this bucket will likely increase your deploy times as the new deployment cannot build on your previous deployment.

Given the aforementioned, I think the behavior you are facing is totally expected.

I've seen the same behavior for my app, I'm not sure if you have reached to any conclusion since you posted this question.

I deployed an app in an specific region but Google creates multi-region buckets automatically, in my case two of them are "multi-region" at least in the same region I stated, but for the artifact, I get a "multi-region" bucket in a completely different region, which is the one I'm getting charged by. Either way I'm not going over the free quotas so I don't understand why they are charging me for.

I was thinking on trying a "bucket move", manually recreating a single region bucket with the same name/properties and transferring the actual content to this new one, but I'm not sure if I'll break something, I'm still learning on these GCP topics.

Related