How to Build an API Program That Doesn’t Suck - Build What's Next

Hi There, Thank you for downloading the e-book

E-book

How to Build an API Program That Doesn’t Suck

READ FULL INTRODOWNLOAD AGAIN

4009

Of your peers have already downloaded this article

4:20 Minutes

The most insightful time you'll spend today!

Blog

Minimum Instances for Cloud Functions to Keep Performances Going for Serverless Apps

3367

Of your peers have already read this article.

2:00 Minutes

The most insightful time you'll spend today!

Minimium instance features in the lightweight compute platform, Cloud Functions keeps serverless apps online during low demands. Read blog to learn how you can leverage the min instance feature to run latency-sensitive apps.

Cloud Functions, Google Cloud’s Function as a Service (FaaS) offering, is a lightweight compute platform for creating single-purpose, standalone functions that respond to events, without needing an administrator to manage a server or runtime environment. 

Over the past year we have shipped many new important capabilities on Cloud Functions: new runtimes (Java, .NET, Ruby, PHP), new regions (now up to 22), an enhanced user and developer experience, fine-grained security, and cost and scaling controls. But as we continue to expand the capabilities of Cloud Functions, the number-one friction point of FaaS is the “startup tax,” a.k.a. cold starts: if your function has been scaled down to zero, it can take a few seconds for it to initialize and start serving requests. 

Today, we’re excited to announce minimum (“min”) instances for Cloud Functions. By specifying a minimum number of instances of your application to keep online during periods of low demand, this new feature can dramatically improve performance for your serverless applications and workflows, minimizing your cold starts.

Min instances in action

Let’s take a deeper look at min instances with a popular, real-world use case: recording, transforming and serving a podcast. When you record a podcast, you need to get the audio in the right format (mp3, wav), and then make the podcast accessible so that users can easily access, download and listen to it. It’s also important to make your podcast accessible to the widest audience possible including those with trouble hearing and those who would prefer to read the transcript of the podcast. 

In this post, we show a demo application that takes a recorded podcast, transcribes the audio, stores the text in Cloud Storage, and then emails an end user with a link to the transcribed file, both with and without min instances. 

Approach 1: Building the application with Cloud Functions and Cloud Workflows

In this approach, we use Cloud Functions and Google Cloud Workflows to chain together three individual cloud functions. The first function (transcribe) transcribes the podcast, the second function (store-transcription) consumes the result of the first function in the workflow and stores it in Cloud Storage, and the third function (send-email) is triggered by Cloud Storage when the transcribed result is stored and sends an email to the user to inform them that the workflow is complete.

Transcribe Podcast Serverless Workflow.jpg
Fig 1. Transcribe Podcast Serverless Workflow

Cloud Workflows executes the functions in the right order and can be extended to add additional steps in the workflow in the future. While the architecture in this approach is simple, extensible and easy to understand, the cold start problem remains, impacting end-to-end latency. 

Approach 2: Building the application with Cloud Functions, Cloud Workflows and min instances

In this approach, we follow all the same steps as in Approach 1, with a slightly modified configuration that enables a set of min instances for each of the functions in the given workflow.

Transcribe Podcast Serverless Workflow (Min Instances).jpg
Fig 2. Transcribe Podcast Serverless Workflow (Min Instances)

This approach presents the best of both worlds. It has the simplicity and elegance of wiring up the application architecture using Cloud Workflows and Cloud Functions. Further, each of the functions in this architecture leverages a set of min instances to mitigate the cold-start problem and time to transcribe the podcast.

Comparison of cold start performance

Now consider executing the Podcast transcription workflow using Approach 1, where no min instances are set on the functions that make up the app. Here is an instance of this run with a snapshot of the log entries. The start and end timestamps are highlighted to show the execution of the run. You can see here that the total runtime in Approach 1 took 17 s. 

Approach 1: Execution Time (without Min Instances)

Approach 1.jpg

Now consider executing the podcast transformation workflow using Approach 2, where min instances are set on the functions. Here is an instance of this run with a snapshot of the log entries. The start and end timestamps are highlighted to show the execution of the run, for a total of 6 s. 

Approach 2: Execution Time (with Min Instances)

Approach 2.jpg

That’s an 11 second difference between the two approaches. The example set of functions are hardcoded with a 2 to 3 second sleep during function initialization, and when combined with average platform cold-start times, you can clearly see the cost of not using min instances.

You can reproduce the above experiment in your own environment using the tutorial here

Check out min instances on Cloud Functions

We are super excited to ship min instances on Cloud Functions, which will allow you to run more latency-sensitive applications such as podcast transcription workflows in the serverless model. You can also learn more about Cloud Functions and Cloud Workflows in the following Quickstarts: Cloud FunctionsCloud Workflows.

4657

Of your peers have already watched this video.

1:30 Minutes

The most insightful time you'll spend today!

Blog

Best Practices to Protect APIs against 6 Common Threats

APIs are exposed to a set of vulnerabilities that are both, unique and similar to that of software and web apps. Watch the video to learn six common API threats and best practices to protect from unwanted attacks.

Blog

A Year of Connecting Brand and Consumers with Google’s Business Messages

6172

Of your peers have already read this article.

3:00 Minutes

The most insightful time you'll spend today!

COVID-19 pandemic changed how consumers interact with brands to purchase products. Google Business Messages was launched and underwent many value-based iterations to drive meaningful conversations and CX. Read the blog for a quick recap!

Last June, in the early months of the pandemic, we expanded Business Messages to support all kinds of businesses, from pharmacies and grocery stores to airlines and luxury brands. Then, in December, we announced the ability for small businesses to use the Google Maps app to message with their customers. We knew people would find messaging directly with businesses from Google Search and Maps helpful, but we didn’t know just how valuable it would turn out to be. 

Consumers are increasingly eager to use messaging to connect with brands, and businesses across all industries are now building innovative messaging experiences to address that growing need. The demand from consumers is reflected in recent data:

Being able to message a business directly has never been more important. For me personally, there’s nothing more fulfilling than using technology to help people in the moments that matter. After the release of initial COVID-19 vaccines in late 2020, online searches for vaccines reached an all-time high. To help people searching for vaccine eligibility, availability, and appointment booking, Albertsons Companies’ banner pharmacies—like Albertsons, Safeway, and Vons—made this information easily accessible through Google Search and Maps via the “chat” button. This  gave people the information they needed, when they needed it.

AlbertsonsVaccineApptUserJourney_MAINwPhone_w700.gif

To be more helpful in moments like these, over the last year, we’ve made Business Messages available globally, in more than 70 languages, and we’ve seen more than 30,000 brands and 200 partners come on board. Major brands like Carrefour, Walmart, and Woolworths have invested in Business Messages to help serve their consumers in new and meaningful ways. 

Expanding the conversation between consumers and brands

The retail sector has undergone a transformation since the start of the pandemic. As a result, we know it is critical for digital services to integrate with physical stores. We were able to do just that with Google’s Business Messages, which has been instrumental in helping better serve our customers across 1200+ stores in Europe.Thomas Rudelle
Global Digital Marketing Director, Carrefour

There were major shifts in consumer behavior during the pandemic, from the way people found and purchased products to the ways they interacted with businesses. Not only did we see higher demand for direct contact with brands, but retail searches also surged. At the end of 2020, retail searches grew at a rate that was more than three times higher than the same period in 2019 (based on Google internal data).

As Business Messages has become more widespread, brands are able to boost both responsiveness and customer satisfaction using the service. Levi’s, for example, surpassed 85% customer satisfaction scores using Business Messages and they discovered that the service drove 30x more store-related questions than web chat.

Levi_A_MAINwPhone_w700.gif

Many brands have also digitized what were traditionally in-store experiences, especially in high-consideration categories like jewelry. For example, Signet brought its virtual jewelry consultant to Business Messages, offering customers advice and answering queries in a way that’s convenient but still feels personal.We started using Google’s Business Messages pretty early on, and continue to transform and improve our experience. The ability to let customers know whether a product is in stock, and its precise location, is critical to offering a connected and frictionless shopper experience. Of course it also helps reduce the workload on our store and customer hub teams.Nick Eshkenazi
Chief Digital Technology Officer, Woolworths

Woolworths_MAINwPhone_w700.gif

As a working mother, these sorts of innovations have made a direct impact in my own life. I find it very helpful to be able to ask—and get real-time answers to—everyday questions using Business Messages, ranging from store hours and product availability to order status and how to make returns. One of my favorite features is the ability to know, in real time, what store wait times are like, and the exact location of the product I’m looking for, saving me precious time when I visit the store. 

Business Messages helps people do more with their time in other ways as well. Earlier this year I’d been meaning to change my insurance plan, but kept pushing it off because I didn’t want to get on a phone call. I can now message Geico to update my policy through the agent pretty effortlessly. Similarly, in India, Vi customers can use 24×7 real-time customer service to chat with their AI powered virtual assistant VIC, integrated with Google’s Business Messages, to check billing information, activate packs, add recharges and payments, check balances, and much more—and it all happens seamlessly.

Vodafone_MAINwPhone_w700.gif

Building a full suite of messaging products

We’re investing in building a full suite of messaging products that enable seamless conversational commerce to drive business results. As Business Messages continues to support brands in establishing their messaging presence on Google, we’re also experimenting with other ways to help them increase their reach and engagement on Search and Display. To accelerate on the digital front, we recently integrated AdLingo, a project built within Area 120, Google’s in-house incubator. This will enable brands to easily transform ads into AI powered, personalized conversations at scale.

For more information on how you can activate Business Messages, please reach us via the contact form on the Business Messages website. Merchants can also read and respond to messages via Google My Business or on the Google Maps app.

4045

Of your peers have already watched this video.

2:20 Minutes

The most insightful time you'll spend today!

Case Study

Telstra Leverages APIs To Accelerate Digital Transformation

Telstra is Australia’s leading telecommunications and technology company, offering a full range of communication services and competing in all telecommunications markets.

In Australia, it provides 17.7 million retail mobile services, 4.9 million retail fixed voice services and 3.6 million retail fixed broadband services.

But owing to legacy infrastructure the company was unable to boost business efficiency and agility. To address these challenges, the company decided to leverage the Apigee platform.

“One of the key challenges that Apigee helped us solve was ensuring greater efficiency. Efficiency in business is absolutely critical. The more efficient you become the quicker you can solve problems and hence lower costs of solving those problems,” says David Freeman, General Manager of API enablement, Telstra.

Freeman also highlights that the Apigee platform has helped Telstra reduce the cycle time of delivery from months to days and sometimes even minutes. It also empowered the organization to efficiently track their developer community as well.

“Apigee was not only able to take systems and services and turn them into APIs but it also provided an analytics capability where we could keep an eye on the developer community, we could see what the developers were doing with APIs. On top of that, it also provided a great way to monetize APIs. This ensures that our developers can quickly and easily consume APIs,” says Freeman.

Watch this short video and get greater insights into how Apigee is helping Telstra accelerate digital transformation.

Blog

Google Extends Support for Windows Server Containers on Anthos for Faster App Modernization and Consistent Dev Experience

5581

Of your peers have already read this article.

3:00 Minutes

The most insightful time you'll spend today!

Google announced support for Windows Server containers running on Google Kubernetes Engine (GKE). This year, Google took a step ahead with support for Windows Server on Anthos to help achieve similar experience across hybrid and cloud environs.

Today, many applications in organizations’ data centers run on Windows Server. Modernizing these traditional Windows apps onto Kubernetes promises a host of benefits: a consistent platform across environments, better portability, scalability, availability, simplified management and speed of deployment, just to name a few. But how? Rewriting traditional .NET applications to run on Linux with .NET Core can be challenging and time-consuming. There is, however, a lower-toil, more developer friendly option.

Last year, we announced support for Windows Server containers running on Google Kubernetes Engine (GKE), our cloud-based managed Kubernetes service, which lets you take the advantage of containers without porting your apps to .NET core or rewriting them for Linux. Today, we’re going a step further with support for Windows Server containers on Anthos clusters on VMware in your on-premises environment. Now available in preview, you can consolidate all your Windows operations across on-prem and Google Cloud.

Bringing Windows Server support to our family of Kubernetes-based services—GKE running on Google Cloud, and Anthos everywhere—with the same experience, lets you modernize apps faster and achieve a consistent development and deployment experience across hybrid and cloud environments. Further, by running Windows and Linux workloads side by side, you get operational consistency and efficiency—no need to have multiple teams specializing in different tooling or platforms to manage different workloads. The single-pane-of-glass view and the ability to manage policies from a central control plane simplifies the management experience, while bin packing multiple Windows applications drives better resource utilization, leading to infrastructure and license savings.

Google Cloud Console.jpg
Google Cloud Console provides a single pane of glass view for managing your clusters in different environments

With all these benefits, it’s no surprise that customers such as Thales, a French multinational firm specializing in aerospace and security services, have been able to reap significant benefits by moving Windows applications to GKE. 

“We moved our Windows applications from VMs to Windows containers on GKE and now have a unified mechanism for Linux and Windows-based application management, scaling, logging, and monitoring. Earlier, setting up these applications in VMs and configuring them for high availability used to take up to a week, and the applications were not easily scalable,” said Najam Siddiqui, Solutions Architect at Thales. “Now with GKE, the setup takes only a few minutes. GKE’s automatic scaling and built-in resiliency features make scaling and high-availability setup seamless. Also, manually maintaining the VMs and applying security patches used to be tedious, which is now handled by GKE.” 

Let’s take a deeper look at the architecture that lets you run your Windows container-based workloads on-prem. 

Windows Server running on-prem with Anthos 

The diagram below illustrates the high-level architecture of running Windows container-based workloads in an on-prem GKE cluster with Anthos. Windows server node-pools can be added to an existing or new Anthos cluster. Kubelet and Kube-proxy run natively on Windows nodes, allowing you to run mixed Windows and Linux containers in the same cluster. The admin cluster and the user cluster control plane continue to be Linux-based, providing you a consistent orchestration experience and management ease across Windows and Linux workloads.

Windows Server and Linux containers.jpg
Windows Server and Linux containers running side-by-side in the same Anthos on-prem cluster

Get started today

When considering modernizing your on-prem Windows estate, we recommend running Windows Server containers on Anthos in your own data center. If you are new to Anthos, the Anthos getting started page and the Coursera course on Architecting Hybrid Cloud with Anthos are good places to start. You can also find detailed documentation on our website, and our partners are eager to help you with any questions related to the published solutions, as is the GCP sales team. And as always, please don’t hesitate to reach out to us at anthos-onprem-windows@google.com if you have any feedback or need help unblocking your use case.

More Relevant Stories for Your Company

How-to

How to Pick a Database that is Suitable for Your Application

Picking the right database for your application is not easy. The choice depends heavily on your use case—transactional processing, analytical processing, in-memory database, and so on—but it also depends on other factors. This post covers the different database options available within Google Cloud across relational (SQL) and non-relational (NoSQL) databases

How-to

A Pro’s Tip on Choosing the Right Google Cloud Compute Options

Where should you run your workload? It depends...Choosing the right infrastructure options to run your application is critical, both for the success of your application and for the team that is managing and developing it. This post breaks down some of the most important factors that you need to consider

Case Study

How Ather Energy is leveraging the Cloud to build and scale smart mobility solutions for India

In 2013, long before the world was discussing clean energy and sustainable practices, two IIT Madras graduates — Swapnil Jain and Tarun Mehta — had an idea to develop India’s first-ever electrical scooter. This was at a time when auto manufacturers were still focusing on fossil-fuel-driven vehicles and ‘eco-friendly’ mobility

Infographic

A Human Centered Design to Chart a Superior Customer Journey!

Banking, insurance and fintech companies strive to deliver superior customer experience. By adopting a human centered design for the digital customer journey, platform providers can drive monetization by focusing on interactions, behaviors and events!

SHOW MORE STORIES