Google Cloud | Compute | Circuit

Let Google Cloud’s Predictive Services Autoscale Your Infrastructure

At Google Cloud, we believe you get most benefits from the cloud when you scale infrastructure based on changing demand. Compute Engine allows you to configure autoscaling to save costs during periods of low demand, and add capacity to support peak loads. 

When you use a managed instance group (MIG), you can have an autoscaler automatically create or delete virtual machine (VM) instances based on increases or decreases in load. However, if your application takes several minutes to initialize, creating VMs in response to growing load might not increase your application’s capacity quickly enough. For example, if there’s a large increase in load (like when users first wake up in the morning), some users might experience delays while your application is initializing on new instances.

A good way to solve this problem would be to create VMs ahead of demand so that your application has enough time to initialize beforehand. This requires knowing upcoming demand. If only we could predict the future… Well, now we can!

Introducing predictive autoscaling

Predictive autoscaling uses Google Cloud’s machine learning capabilities to forecast capacity needs. It creates VMs ahead of growing demand allowing enough time for your application to initialize.

Figure 1. Autoscaling creates VMs as demand grows leaving no buffer for application to initialize. Predictive autoscaling creates VMs ahead of demand allowing enough time for your application to initialize and start serving new load.

How does it work?

Predictive autoscaling uses your instance group’s CPU history to forecast future load and calculate how many VMs are needed to meet your target CPU utilization. Our machine learning adjusts the forecast based on recurring load patterns for each MIG. 

You can specify how far in advance you want autoscaler to create new VMs by configuring the application initialization period. For example, if your app takes 5 minutes to initialize, autoscaler will create new instances 5 minutes ahead of the anticipated load increase. This allows you to keep your CPU utilization within the target and keep your application responsive even when there’s high growth in demand. 

Many of our customers have different capacity needs during different times of the day or different days of the week. Our forecasting model understands weekly and daily patterns to cover for these differences. For example, if your app usually needs less capacity on the weekend our forecast will capture that. Or, if you have higher capacity needs during working hours, we also have you covered.

Why should you try it?

Predictive autoscaling continuously adapts forecasted capacity to best match upcoming demand. Autoscaler checks the forecast several times per minute and creates or deletes VMs to match its prediction. The forecast itself is updated every few minutes to match recent load trends so if your growth rate is higher or lower than usual we will adjust the forecast accordingly. This gives you capacity needed to cover peak load while saving on cost when demand goes down. 

You can start using predictive autoscaling without worry as it’s fully compatible with the current autoscaler. Autoscaler will calculate enough VMs to cover both forecasted as well as real-time CPU load—whichever is higher. This works with other autoscaling features as well: you can scale based on schedule, your Load Balancer request target or Cloud Monitoring metrics. Autoscaler provides enough capacity to all of your configurations by taking the highest number of VMs needed to meet all your targets.

Getting started

You can enable predictive autoscaling in the Google Cloud Console. Select an autoscaled MIG from the instance groups page and click Edit group. Change predictive autoscaling configuration from Off to Optimize for availability.

To better understand whether predictive autoscaling is good for your application, click the link See if predictive autoscaling can optimize your availability. This will show you a comparison of the last seven days with your current autoscaling configuration vs. with predictive autoscaling enabled.

In the above chart, 

  • Average VM minutes overloaded per day shows how often your VMs exceed your CPU utilization target. This happens when demand is higher than available capacity. Predictive autoscaling can reduce this by starting VMs ahead of anticipated load. 
  • Average VMs per day is a proxy for cost. This shows how much additional VM capacity you need to keep your CPU utilization within the target you have set. You can optimize your cost by adjusting Minimum instances andCPU utilization as explained below. 

Optimizing your configuration

Make sure your Cool down period reflects how long it takes for your application to initialize from VM boot time until it’s ready to serve the load. Predictive autoscaling will use this value to start VMs ahead of forecasted load. If you set it to 10 minutes (600 seconds) your VMs will start 10 minutes before the load is expected to increase.

Review your autoscaling CPU utilization target and Minimum number of instances. With predictive autoscaling you no longer need a buffer to compensate for the time it takes for a VM to start. If your application works best at 70% CPU utilization you don’t need to set target to a much lower value as predictive autoscaling will start VMs ahead of usual load. A higher CPU utilization and lower Minimum number of instances allows you to reduce the cost as you don’t need to pay for additional capacity to prepare for growing demand.

Try predictive autoscaling today

Predictive autoscaling is generally available across all Google Cloud regions. For more information on how to configure, simulate and monitor predictive autoscaling, consult the documentation.

By: Pawel Wenda (Product Manager)
Source: Google Cloud Blog

For enquiries, product placements, sponsorships, and collaborations, connect with us at We'd love to hear from you!

Our humans need coffee too! Your support is highly appreciated, thank you!

Previous Article
Google Cloud | Security

New Research: Enterprises More Confident Than Ever In Cloud Security

Next Article

Rubin Observatory Offers First Astronomy Research Platform In The Cloud

Related Posts

IBM and Influential Launch AI-enabled Social Targeting Solution To Help Brands Identify Suitable Influencers

New Solution, "IBM Watson Advertising Social Targeting with Influential," Harnesses AI to Help Identify Influencers that Align with a Brand's Values and Voice NEW YORK, July 30, 2020 /PRNewswire/ -- IBM (NYSE: IBM) today announced the launch of Watson Advertising Social Targeting with Influential, a new solution that harnesses artificial intelligence (AI) to help brands identify influencers that best align with their brand values. The new solution within the Watson Advertising suite of targeting products marks an expanded collaboration with Influential, a leader in advanced social media technology. As brands shift advertising tactics in an increasingly fluid landscape, the social targeting tool can help brands communicate with an audience. Harnessing the power of Watson to help clients make data driven decisions that foster connections with consumers, Social Targeting with Influential: Leverages IBM Watson Natural Language Understanding on the IBM public cloud to process and analyze social media data to help expedite influencer identification; Identifies brand-safe influencers by gauging profanity ratings to recommend potential partners with shared values; Marries online behavior with offline purchase to help drive ROI based on real-time campaign measurement across brand perception, consumer engagement, online conversion, offline sales and foot traffic; and Delivers tone appropriate ads to real people at the right time to help drive engagement. "Brand reputation matters now more than ever. Using social media to help drive purchase consideration is important as brands implement influencer marketing strategies to establish real connections with consumers, said Bob Lord, SVP of Cognitive Applications, Blockchain and Ecosystems, IBM. "Together with Influential, we're building trust into the ecosystem by applying IBM Watson to help clients select an influencer that aligns to their brand values, exemplifying our belief that AI can and should be the backbone of the new digital economy." According to the 2019 Influencer Marketing Global Survey from Rakuten, an insight and analytics company, 87% consumers surveyed stated that they were inspired to make a purchase based on an influencer's recommendation.1 Further illustrating the power of influencer marketing to guide purchases, 61% of responding consumers stated their intent to click on a sponsored link from an influencer to learn more about a product.2 Social Targeting with Influential relies on IBM Watson to align brands with like-minded influencers that demonstrate similar values, further illustrating how brands across industries can harness AI to make more informed decisions. Solidifying the power of "belief-driven buying," in a recent survey conducted by Salesforce Research, 92% of consumers surveyed report that trusting a brand makes them more likely to buy products and services.3 According to an audience poll conducted by IBM Watson Advertising at the MMA Global CEO/CMO Summit on brand trust, 52% of respondents stated that they're likely to pause advertising on Facebook, illustrating the power of preserving brand integrity on social media platforms.4 "More than ever, brands seek to make sure every dollar spent drives a measurable return in the online and offline world" said Influential CEO Ryan Detert. "Influencer marketing has evolved into a fully trackable channel that leverages suitable voices to speak on behalf of brands. We've seen how powerful Watson can be and are thrilled to expand our relationship with IBM Watson Advertising to bring this offering to even more brands and influencers." Establishing the Influential tool's importance as the advertising industry readies for a future without cookies, Social Targeting with Influential does not rely on third-party data, but rather anonymized first-party data generated by an influencer's followers on social media, further developing a relationship between brand and consumer. Acknowledging the value that the Influential tool brings to the marketplace, leading brands like Wells Fargo, McDonald's and the NFL today are using the Influential platform to help drive consumer engagement and ROI. "Influential's IBM Watson-powered campaigns have helped us identify the right influencers and deliver at scale to help us better connect with our target audiences, added Michael Lacorazza, Executive Vice President, CMO, Head of Integrated Marketing, Wells Fargo. These brands using the Influential platform saw unprecedented 100% positive sentiment scores among users and an increase in ROAS compared to social benchmarks, further illustrating the importance of harnessing AI technology to make smarter decisions.5 About Influential Influential is an AI-powered social data and conversion technology. Leveraging a network of over 1 Million social media influencers, Influential's technology powers seamless talent discovery, comprehensive brand safety, and creative and execution services. Through strategic partnerships with first and third-party data providers, Influential's Optimized Paid Media offering enables bespoke targeting and measurement solutions, including both online and offline attribution, such as sales lift, TV tune-in lift, foot traffic, as well as brand lift studies. Influential works with Fortune 500 brands, including Walmart, McDonald's, Pepsi, NFL, Nestlé, General Mills, Toyota, Samsung, and Sony Pictures. With offices in Los Angeles, NYC, and Las Vegas, Influential is a developer partner of IBM Watson, a strategic partner of WME and Oracle, and a Facebook and Instagram Marketing Partner. (  About IBM and Artificial Intelligence  A world leader in AI software, services, and technology for business, IBM has deployed Watson AI solutions in thousands of engagements with clients across 20 industries and 80 countries. IBM's Watson AI solutions are widely used in industries, including seven of the 10 largest automotive companies and eight of the 10 largest oil and gas companies.   For more information about IBM, visit   1. Influencer Marketing Global Survey, Rakuten, 2019.2. Influencer Marketing Global Survey, Rakuten, 2019.3. Trends in Customer Trust Report, Salesforce, 2019.4. Audience Poll, MMA CEO/CMO Summit, 2020.5. The performance data discussed herein is presented as derived under specific operating conditions. Actual results may vary. SOURCE IBM