How to deploy your web app to Google Cloud and Render for free

Platform as a Service Tutorial - Google App Engine vs Render
How to deploy and host a dynamic web application (Node.js, Java, Ruby, Python, Go) on the cloud for free with a PaaS (Platform as a Service) provider such as Google App Engine and Render

Introduction

Whether working alone or with a team, developers often need to host their web apps on the cloud for learning, experimenting and development purposes or when running services sporadically and occasionally.

Many cloud platforms offer a free starter plan to deploy these kinds of apps.

The platforms that offer the most features with excellent developer experience include Google App Engine (part of the Google Cloud Platform aka GCP) and Render.


Google App Engine: extra cloud features

If you want to deploy highly scalable applications on a fully managed serverless platform, Google App Engine is the right choice.

Out of the box supported languages include: Java, PHP, Node.js, Python, Ruby and Go.

In addition to hosting your application, you get the following features for free:

Free plan quotas and limitations

  • Up to 256 MB of memory for Java, Node.js, Python, PHP, Ruby and Go
  • 28 free hours per day: shared by all your apps, enough for 1 app (see Tips for more info)
  • 1 GB app size (Code & Static Data Storage)
  • No single static data file can be larger than 32MB. The limit for Go is 64MB
  • Outgoing bandwidth: 1 GB / day
  • Each incoming HTTP request can be no larger than 32MB

Getting started

You don't need to activate the trial to create an app engine project:

Your Google App Engine application is now created.

Follow the quickstart guide relative to your programming language to prepare your web app and necessary config files

You can deploy using a plugin for your project's build tool when available. You can also deploy your app by executing gcloud app deploy from the Google Cloud SDK Shell within your app's root directory (may require to add a billing method)

After deploying the app, you can view the quota limits from the Quotas page

Tips

  • When you deploy your app to Google App Engine, it's automatically associated to one of the following instance types:

    • Frontend Instance: 28 free F1 instance-hours per day
    • Backend Instance: 9 free B1 instance-hours per day

    By default, your app is assumed to be a Frontend Instance with automatic scaling. But if you change the app.yaml in your root directory, and introduce a configuration to enable the Basic or Manual scaling, your app will become assumed to be a Backend Instance. To ensure that your app usage will always be free, you can define the following properties in your app.yaml file

    ---
    instance_class: F1
    automatic_scaling:
      max_instances: 1
  • Add the --quiet flag to your gcloud command to disable all interactive prompts

  • When deploying using a gcloud command, specify explicitly your app's version to avoid having multiple instances being billed thus reducing your daily free hours allowance. A glcoud deploy command example would be: gcloud --quiet app deploy --version=production

References


Render: the ultimate Heroku alternative

Render is a fully-managed platform that gives you the simplest path to delivering apps quickly, seamless continuous integration and a great Heroku alternative.

You can deploy all your web apps, static sites, APIs / Web Services, scheduled / cron jobs, PostgreSQL database and Redis cache in one place using git as your code repository and deploy trigger.

Supported technologies include:

Free plan quotas and limitations

  • 256 MB RAM
  • 1 GB SSD storage
  • 97 connections
  • 10 GB of egress (outgoing) bandwidth per month
  • 750 hours of running time per month
  • The app sleeps after 15 minutes of inactivity

Other limitations include 500 minutes of free builds and limited scaling.

Getting started

  • Navigate to the dashboard homepage and sign up
    Render sign up
  • Create a new web service
    Render dashboard
  • Link your git repository (Github or Gitlab are supported)
    Render git link-up

You can choose the free plan and configure your web app deployment in the next page.

You can also deploy either manually or automatically when pushing to your git repository.

References



Author Image

Soufiane Sakhi is an AWS Certified Solutions Architect – Associate and a professional full stack developer based in Paris, France. He is the creator of Simply-how.com, the My Route Directions Android app, and many open source browser extensions such as YouTube Playlist Helper and Feedly filtering and sorting.