I Learned “These” at Startup

We cut down 45% of our budget by switching to Google Cloud Storage

All you need to know to achieve MVP with Google Cloud Storage

Calvin Nguyen

--

What is the Minimum Viable Product? (MVP)

A minimum viable product is a version of a product with just enough features to satisfy early customers….

Not only the app has to show the main reasons why it’s developed in a short period of time, but we also want to use the least money and resources to host and maintain the app.

That’s why I want to help you save money and time to get your product rolling quickly online with Google Cloud Storage.

Want to read this story later? Save it in Journal.

Why Google Cloud Storage?

After working with a few deployment strategies, I realized that it’s best to host your website on Cloud Storage because:

  1. Faster deployment: There are many ways to deploy your website on Google Cloud such as App Engine/ Compute Engine, but it usually took me 10–15 minutes to deploy. With Cloud Storage, it took me 20–30s to upload my folder to the storage, depending on the size of the project.
  2. Less complexity: You will need double extra steps to config your website.
  3. Easier to maintain/update: It’s very easy to re-build the project and deploy your updated website in 1 command-line
  4. Lastly, Cheaper: Our startup has reduced ~45% total cost after switching to Google Cloud Storage. The cost to host a Compute Engine or App Engine is around $10~$20 / month depending on how busy your web is. With Cloud Storage, cost nearly = $0 because you only store a static folder that never goes beyond 1Gb.

App Engine vs. Cloud Storage

The 2 images below show how App Engine and Cloud Storage are hosted:

  • App Engine cost per hours: The longer you host your website or the larger your project is, the more expensive you will be paid)
App Engine cost based on your Memory + Storage (Per Hours)
  • Cloud Storage cost per month: You only pay for the amount of storage you deploy (size of your project) per month.
Cloud Storage cost by the amount of data stored in your buckets

If your storage is 0.5 GB, it will be $0.013/month. Comparing to the cheapest in App Engine is $0.05/hour, which can be increased over time because you add more things to your project.

However, not all the time you want to use Google Cloud storage.

Limitation

  1. Required a domain: Google Cloud Storage can ONLY deploy your web page when you own a domain.
  2. Source Code maybe public: When you deploy your folder on Google Cloud Storage, you must config it to be “Public”. Not recommended if you want to deploy a server like Node.js, Python, etc. You can deploy and do more things with Compute Engine.
  3. Host your web on http: This is not too big of a problem, as you can always configure your DNS on other services like Google Domain, Amazon Route53, Cloudflare.
  4. Only host static web page. It can only read 1 html file to open the page.

Helpful Links during the setup

As discussed, you can use any methods to deploy your website depend on what you have, what you need, and what you want to achieve. If you want to achieve MVP, I’d highly recommend using Google Cloud Storage to host Static Web Apps like React/Angular/Vue, etc.

Now Priyanka Vergadia wrote a great article on hosting to the cloud storage already, so no need to write this up again. But I’d like to add more helpful links on top of her article to help you with solving any bugs/ errors:

  1. Install Google Cloud CLI: gsutil here
  2. Buy a domain and verify you are the owner of the domain
  • Copy the TXT content in the pop-up
  • Go to DNS Provider, where you bought your domain. In my case, I use Cloudflare
Cloudflare

There are 2 fields that you’ll want to configure in your DNS:

  • TXT — — — domain.com — — — <paste-your-TXT>: this will allow Google to verify your domain, knowing that you’re the owner in order to proceed the next steps
txt         calvinqc.com           google-site-verification=xyz123a
  • Add a CNAME record
CNAME           calvinqc.com          c.storage.googleapis.com.

3. Google Cloud Storage can deploy your website over http. If you want to use https, you can configure on your DNS Provider like Cloudflare in below images

4. Important

If you are deploying any React or Angular, make sure to put index.html in the Error Page instead of 404.html . Sometimes, if you have a route: domain.com/blog, it won’t know the HTML page for /blog because Cloud Storage only hosts a static page.

Since React/Angular only changes the components within the page, so you can redirect back to index.html so it will show the updated components

Follow-up

  • Thanks for reading I Grow with Startups, where I wrote about Tech tutorials, news, and tips to improve software developers’ experience. If you’d like to read more in the future, please subscribe to the series.​
  • Connect with me on Github, LinkedIn

📝 Save this story in Journal.

👩‍💻 Wake up every Sunday morning to the week’s most noteworthy stories in Tech waiting in your inbox. Read the Noteworthy in Tech newsletter.

--

--