How to make the most of the Google Cloud free tier

News Ever

 How to make the most of the Google Cloud free tier

10 tips for stretching Google’s free services to the limit and pinning your cloud meter at zero.

The cloud computing industry loves to give away free samples and Google is no different from Amazon or Microsoft in this respect. The companies know that if you give the customers a free taste, they’ll come back when it’s time for a meal.

Google offers two types of free. New customers get $300 to spend on any of the machines or services spread out among the 24 “cloud regions,” 73 “zones,” and 144 “network edge locations.” The money works pretty much everywhere in the Google cloud from raw compute power to any of several dozen different products like databases or map services.

Some developers use the free tier for what it’s intended to be: an opportunity to explore without begging their boss and their boss’s boss for a budget. Others work on a side hustle or a website for the neighborhood kids. When the load is small, it’s easy to innovate without dealing with a monthly bill.

Some developers take this to the extreme. They try to stay in the free tier as long as possible. Perhaps it’s because they want to brag about their insanely low burn rate. Maybe it’s just a form of modern machismo. Maybe they’re low on cash.

In any case, working this free angle as long as possible generally leads to lean and efficient web applications that do as much as possible with as little as possible. When the day comes that they leave the free tier, the monthly bills will stay small as the project scales, something that warms the heart of every CFO.

Here are a few of the secrets for squeezing every last drop of goodness from Google’s free offering. Maybe you’re cheap. Maybe you’re just waiting to tell your boss until the awesomeness is completely realized. Maybe you’re just having fun and this is a goof. Whatever the case, there are many ways to save. 

Store only what’s necessary

The free databases like Firestore and Cloud Storage are completely flexible tools that squirrel away key-value documents and objects respectively. Google Cloud’s always-free tier lets you store your first 1GB and 10GB in each product respectively. But the more details your app keeps, the faster the free gigabytes will run out. So quit saving information unless you absolutely need it. This means no obsessive collection of data just in case you need it for debugging later. No extra timestamps, no large cache full of data you’re keeping just to be ready.

Compression is your friend

There are dozens of good pieces of code for adding a layer of compression to your clients. Instead of storing fat blocks of JSON, the client code can run the data through an algorithm like LZW or Gzip before sending it over the wire to your server instances, which store it without unpacking it. That means faster responses, fewer bandwidth issues, and less impact on your free monthly data storage quota. Be a bit careful because some very small data packets can get bigger when the overhead from compression is included.

Go serverless

Google is more generous with their intermittent compute services that are billed per request. Cloud Run will boot up and run a stateless container that answers two million requests each month for free. Cloud Functions will fire up your function in response to another two million requests. That’s more than 100,000 different operations each day on average. So quit waiting and start writing your code to the serverless model.

Note: Some architects will cringe at the idea of using two completely different services. It may save money but it will double the complexity of the application and that means it will be harder to maintain. That is a real danger, but often you can more or less duplicate the function-as-a-service structure of Cloud Functions inside your own container, making it possible to consolidate your code later if you plan for it.

Google’s App Engine remains one of the best ways to spin up a web application without fussing over all of the details of how to deploy or scale it. Almost everything is automated so it will deploy new instances if the load grows. The App Engine comes with 28 “instance hours” for each day—meaning that your basic app will run free for 24 hours per day and can even scale up for four hours if there’s a burst of demand.

Consolidate service calls

There is some freedom to add extras if you’re careful. The limits on serverless invocations are on the number of individual requests not on the complexity. You can pack more action and more results into each exchange by bundling all of the data operations into one bigger packet. So you can offer silly gimmicks like stock quotes, but only if you slip the extra few bytes into the absolutely essential packets. Just keep in mind that Google counts the memory used and the compute time. Your functions can’t exceed 400,000 GB-seconds memory and 200,000 GHz-seconds of compute time.

Use local storage

The modern web API offers a number of good places to store information. There’s the perfectly good, old-fashioned cookie that’s limited to four kilobytes. The Web Storage API is a document-based key-value system that will cache at least five megabytes of data and some browsers will keep 10 megabytes. The IndexedDB offers a richer set of features like database cursors and indices that will speed plowing through the data which is often stored without limits.

The more data you store locally on your user’s machine, the less you need to use your precious server-side storage. This can also mean faster responses and much less bandwidth devoted to carrying endless copies of the data back to your server. There will be problems, though, when users switch devices because the data probably won’t be in sync. Just make sure the important details are consistent.

Find the hidden bargains

Google maintains a helpful page that summarizes all of the “always free” products, but if you poke around you’ll find plenty of free services that don’t even make the list. Google Maps, for instance, offers “$200 free monthly usage.” Google Docs and a few of the other APIs are always free.

Use G Suite

Many of the G Suite products including Docs, Sheets, and Drive are billed separately and the users either get them free with their GMail account or their business pays for them as a suite. Instead of creating an app with built-in reporting, just write the data to a spreadsheet and share that. The spreadsheets are powerful enough to include graphs and plots like any dashboard. If you build a web app, you’ll need to burn your compute and data quotas to handle the interactive requests. But if you just create a Google Doc for your report, you’re dumping most of the work on Google’s machine.

Strip away gimmicks

Some features of modern web applications are pretty superfluous. Does your bank application need stock quotes? Do you need to include local time or temperature? Do you need to embed the latest tweets or Instagram photos? No. Get rid of all of these extras because each one means another call to your server machines and that eats away at your free limits. The product design team may dream big, but you can tell them, “No!”

Be careful with new options

Some of the cooler tools for building artificial intelligence services for your stack offer good limits for experimenting. The AutoML Video service will let you train your machine learning model on video feeds for 40 hours each month, before charges kick in. The service for tabular data will grind your rows and rows of information on a node free for six hours. This gives you enough rope to experiment or build basic models, but watch out. It would be dangerous to automate the process so every user could trigger a big machine learning job.

Keep costs in perspective

It’s easy to take this game to the extreme and turn your application’s architecture into a Rube Goldberg device just to save a bit more cash. It’s important to remember that the jump from free tier to paying customer is often a pretty tiny step in Google Cloud. While there are many free services on the Internet that jump from free to thousands of dollars with one click, Google’s services generally aren’t priced like that.

The price schedule is generous enough that you’re not going to have a heart attack when you step out of the free zone. If your application needs a few extra million this or that, you’ll probably be able to cover it. The important lesson is that keeping the computational load low will translate to smaller bills and faster responses.

Post a Comment

  • Latest Biss Key + Frequency
    • NHL Service - 10762 V 28800 (7E) - Biss : 12 24 01 D3 11 4B 97 F3 
    • Varzish Sport HD - Yahsat 1A Satellite - Biss Key: 12 34 00 46 EB CD 00 78
    • Bein Sport - Eutelsat 16A Satellite - Biss Key: 12 24 01 D3 11 4B 97 F3
    • Discovery HD UK / Sky One HD - 12188 H 29500 8/9 - Astra 28E
    • Fox Sports Eredivisie 1 HD - 12073 H 30000 - Eutelsat 9E
      • BBC Earth - 11064 V 27500 - Eutelsat 25E
      • BBC Red Button HD 2/3/4/5/6 - 12421 H 27500 2/3 - Astra 28E
      • beIN SPORTS HD NEWS 12604 H 27500 2/3 Nilesat 7W
      Cookie Consent
      We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.
      Oops!
      It seems there is something wrong with your internet connection. Please connect to the internet and start browsing again.
      AdBlock Detected!
      We have detected that you are using adblocking plugin in your browser.
      The revenue we earn by the advertisements is used to manage this website, we request you to whitelist our website in your adblocking plugin.
      Site is Blocked
      Sorry! This site is not available in your country.