Google cloud platform (GCP) provides multiple services for hosting web apps that varies from fully managed platforms to full control over your own server, however exploring all these possibilities may be overwhelming and sometimes confusing for new cloud users.
We will talk briefly about these services’ pros and cons, and typical use cases, keeping in mind that some projects may include a combination of these services all depending on your business needs and the maturity of your team.
Cloud Storage:
Cloud Storage is a service for storing your objects in Google Cloud. An object is an immutable piece of data consisting of a file of any format.
To host a static site in Cloud Storage, you need to create a Cloud Storage bucket, upload the content, and test your new site. You can serve your data directly from storage.googleapis.com, or you can verify that you own your domain and use your domain name.
For billing , no cost is involved beyond standard GCS costs (which are monthly fees based on data storage, network and number of operations).
Pros :
-
Easy to setup.
-
Cloud Storage can directly accept large files submitted by users.
Cons :
No SSL support.
Firebase Hosting:
Firebase Hosting is a fully-managed hosting service typically used for static websites and small dynamic ones when integrated with serverless services like cloud functions.
The pricing is based upon your project’s usage of hosting storage and data transfer.
Pros:
-
To deploy, you only need to one command “firebase deploy.”
-
SSD storage and a global CDN (content delivery network).
Cons:
-
All content is overwritten on each deployment.
-
Limited choice of supported languages.
App Engine :
For small businesses that want to grow without worrying about scaling, using a managed platform seems like a good idea. App Engine is a serverless developing and hosting web applications at scale, it takes care of provisioning servers and scaling your app instances based on demand.
In addition to hourly fees, App Engine uses Cloud Build to build and deploy apps. Cloud Build has its own quotas, and each time you deploy your app to App Engine you use some of this quota.
Pros :
-
Controlled scaling.
-
Fully managed.
Cons:
-
No free quota in the flexible environment.
-
Source code is written in specific versions of the supported programming languages.
Cloud Run :
Continuing with more serverless solutions ,but this time your app will be deployed as a container. Cloud Run is a managed compute platform that enables you to run stateless containers that are invocable via web requests or Pub/Sub events.
Cloud Run charges you only for the resources you use, rounded up to the nearest 100 millisecond.
Pros:
-
Your app deployed as a container which means you can use many languages.
-
Fully managed.
Cons:
- The container must be stateless. This means that the container cannot rely on the state of a service between different HTTP requests, because it may be started and stopped at any time.
Compute Engine :
If you’re looking for full control over your server, or maybe you’re currently using hardware servers to host your app, and you would like to migrate to the cloud, Compute Engine is the perfect solution for you, it enables you to create and run virtual machines on Google infrastructure with specific memory, GPU, CPU that suits your needs.
Compute Engine charges for hourly usage based on disk size, machine type memory, and network.
Pros:
- Complete control of the systems and unlimited flexibility.
Cons:
- Lack of support for some images.
Google Kubernetes Engine (GKE):
For larger business, with more developers, you may want to containerize your application. To do this Google offers a service called Google kubernetes engine that enables you to deploy, manage, and scale containerized apps.
In addition to hourly cluster management fee, GKE uses Compute Engine instances for worker nodes in the cluster. You are billed for each of those instances according to Compute Engine’s pricing.
Pros:
-
Easy to scale.
-
Google is the original creator of Kubernetes, so introduction of new features is faster.
Cons:
-
Costly compared to the other services.
-
Requires complex, manual cluster configuration.
Whether you’re a small blogger or a huge multiscale-commerce site, GCP has a service that will suit your needs. For more details about the pricing you can check the pricing page of each service, or use google cloud calculator to estimate your costs.