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
Author’s Note
Greeting readers,
This article is part of “I Grow with Startups” series, which consists of a variety of Tech tutorials, news, and tips for software development:
- Build a Well Structured 3-tier Architecture with Node.js (Part 1) — ES6
- 2 Simple Tips to Increase Your Team Code Quality
- The Perfect Structure to Authenticate & Authorize Your API with Node.js
- I built a M.E.R.N codebase in an hour (Part 2)
- How to build REST APIs with Java & MySQL using Tomcat
- Build your own Mailing API using Nodemailer, Gmail & Google OAuth2
- WebRTC — The technology that powers Google Meet, Facebook Messenger
- Say Hello to the new Github CLIs
- Easy Setup with Java, Springboot, Kafka
- What it takes to have a successful team cooperation
- How to deploy an application to AWS using Docker, EC2, ECS, and ECR
- We save 45% of the total cost by hosting our client to Cloud Storage
Thanks for visiting this series, and enjoy reading!
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:
- 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.
- Less complexity: You will need double extra steps to config your website.
- Easier to maintain/update: It’s very easy to re-build the project and deploy your updated website in 1 command-line
- 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)
- Cloud Storage cost per month: You only pay for the amount of storage you deploy (size of your project) per month.
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
- Required a domain: Google Cloud Storage can ONLY deploy your web page when you own a domain.
- 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.
- 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. - 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:
- Install Google Cloud CLI:
gsutil
here - 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
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.