Over a decade ago, it was a common practice to host server software on dedicated private servers. In the age of cloud computing, this hasn’t changed a lot because many businesses continue using cloud services as usual servers. The typical scenario is configuring an EC2 instance on Amazon each time when a project needs a new service.
So, while this is convenient for a lazy developer, such a situation finally results in running bunches of such instances for an average-sized project. Moreover, running means paying.
On the other hand, hosting providers give us bunches of components which can reduce the number of servers used in the project.
Option #1: Self-managed physical server hosting.
Pros: even with low-budget hardware, it is often possible to process a lot of data/requests. The hardware is yours, and you only need to have it running.
Cons: you need a DevOps in your team. And some place or office with a reliable Internet connection and electricity supply for putting your servers.
Option #2: Managed virtual or physical server from your hosting provider.
This option includes dedicated servers, virtual hosting, EC2, and any other kinds of service where you don’t own the server but still are responsible for configuring the operating system at a target machine.
Pros: your provider guarantees Internet connection, power supply, and physical location reliability.
Cons: you still need a DevOps.
Option #3: Serverless technology from your Cloud provider.
Besides the compute/execution environment, this option includes all kinds of databases, integration and data processing components. The main idea is that you only need to configure the component and forget the DevOps.
Pros: with proper software design, it is possible to host your software either for free or for much-reduced costs compared to other options.
Cons: you may get stuck to a service from the specific cloud provider having it hard to migrate to another environment.
Option #4: Hybrid Cloud.
Expensive in terms of human resources but combines the best sides of all approaches above. With that option, you can host software in different ways at a time. You can move massive operations to a physical server, serve most API requests from Lambda/Cloud functions, and put EC2 in place for traffic bursts.
Pros: for a big project, this can give the most optimal bills for the infrastructure.
Cons: again, you need a DevOps. However, there is much more DevOps work compared to other approaches.
Depending on the scale of your project, you may prefer one of these approaches. Neither of them is good or bad. It all depends on your specific business goals.
We are not covering the topic of enterprise and too complex solutions in this article. So let’s skip options #1 and #4. Let’s also skip option #2 because it is too common and, therefore, not much impressive.
The goal is to get the most from serverless technologies and the Hybrid Cloud, and also make all happen for free. Fortunately, Google Cloud Platform provides a lot of free services for projects which fall within specified limits. You can get the latest information at the Google Cloud Platform Free Tier page: https://cloud.google.com/free/.
The Google Cloud Platform Free Tier offers:
A $300 bonus is pretty cool, but you can spend it too quickly.
The desirable goal is to build an architecture that uses free-tier products making the business consume no or limited resources for the infrastructure.
Well, it depends on your team’s programming skills. Today, even the cheapest computer is powerful enough to do an immense amount of work. You only need to apply the most efficient way to use those resources. In 90% of all cases, you can easily explain enormous infrastructure bills by simple architecture or software development bugs.
Google Cloud Platform engineers did an excellent charity job designing the Google Cloud Platform free tiers. With a skilled team having a good understanding of the platform, it is possible to host small and middle-sized projects totally for free.
When you work in a startup, the most critical thing is time. So, let’s describe a scenario for getting most benefits out of the Google Cloud Platform, specifically for startups.
At an early stage, before getting traction, it is essential to take care of costs spent on infrastructure. The amount of data and requests processed is small. At this stage, the team mostly uses their product for showing the product to beta-testers and potential investors. This stage can last quite long, and for many projects, this stage is also the final one.
For a faster time-to-market and for making the initial startup team survive with tiny budgets, it is possible to:
When first users start using the project, it is vital to provide positive product experience. Your first users shouldn’t see any crashes, outages, DDOSes, or broken pages. Very often, the project does not get an investor due to stupid bugs while having a bright business idea and quite a complex state-of-the-art product. Oppositely, you need to track various business criteria. And you need to track any incidents for a fast incident resolution.
For all of the above, you benefit from:
You can start small. But suddenly (and this should happen one day), you get at least 5 thousand of users generating data. That is the best time to show your startup to big investors shouting about project success. But with significant resources comes significant responsibility.
The development team should be ready for the project success. And now it is time to think about:
Your infrastructure goal after getting traction is to fit the project back to Free Tier limits. When it is not possible - you need to move forward either with paid Cloud or with physical servers depending on whether you prefer to rent or to own a server.
For each decision related to the infrastructure, you need to evaluate:
There is no silver bullet decision - only the solutions which are right for you at the current conditions.
Static Website Hosting
For content sites, landing pages, early-stage startups, you most likely need a static website that contains minor JavaScript, no back-end features, but which is highly SEO-optimized. You can effectively host such sites using:
ReactJS Single Page Application Hosting
When you extend your project with features - you finally add something like a dashboard written in React.js. Your project now has a single-page application. Such applications are hosted the same way as static sites. In addition to the website, you have an API which uses:
Google Cloud Functions for API endpoints implementation. 2 million API calls per month included in the Free Tier. You should not write code which consumes that quickly at an early stage of a startup. If you have written such code, migrate this code to the Compute Engine.
WordPress Site Hosting
How about the most popular way to build a website? 34% of all websites are Wordpress-based. It can be a personal blog, a technical blog for the project, or even a website for enterprise business.
A WordPress website consumes server resources purely determined by the number of visitors coming to this site. So, you can easily host a WordPress blog on a free virtual machine provided by the Free Tier.
To host a WordPress site on a Google Cloud Platform free tier, you need:
REST API is what you have probably created while making a single-page application. Mobile applications APIs are no way different from the Single Page Application (SPA) APIs.
Best options for hosting REST APIs:
Marketing guys try to squeeze much hype out of the IoT. Technically, IoT integration is a message-based, event-based API capable of processing data from various sensors reliably. Not that hard. Here comes another excellent player from the Free Tier Stack:
The architecture for the IoT integration should be:
For a data scientist, it is nice to have a Cloud Server with pre-installed libraries, free GPU, fast Internet connection, and a powerful CPU.
For many startups, speech recognition and NLP is like a miracle which is nice to have, but hard to reach. Here Google makes all as easy as two API calls:
The Cloud Natural Language tool converts your texts into software-understandable items, which can be processed by any custom software. That is called text tokenization, entity extraction, semantic analysis. In any case, such a solution is hard to be home-brewed, but it sometimes provides quite good opportunities for the business.
The Cloud Speech-to-Text engine, as well as Text-to-Speech engine is highly integrated with Google VOIP and smart assistant products (Dialog Flow, Google Assistant, Google Home). You can use them to enable speech capabilities for the project.
Startup business is a hard game. The more armor you have - the easier it is to win the game. This article is your Swiss knife for the world of cheap infrastructure decisions for your startup. It is hard to share everything we can within a single article. So, please feel free to contact us for more details on each infrastructure scenario.
And a final bonus. The summary checklist for your startup:
Still here? Great! Then we surely have something to discuss and take your project to the next level! Talk to our expert now.
Originally published at: https://www.zfort.com/blog/google-cloud-platform-for-startups