Blog

How to Create On-Demand Elasticity for Changing Resource Needs: Bursting Workloads into Public Clouds

Hybrid and Multicloud Use Case Series (Part 2 of 5)

By: Dwayne Lessner, Sachi Sawamura

June 4, 2021 | min

Bursting into the public cloud should not become its own project. There are a few challenges businesses encounter with cloud migration and management. However, one of the biggest challenges is not being able to manage unified hybrid cloud or multicloud operations. As outlined in the first blog post in this series, Application Mobility Across Cloud is No Longer a Pipedream, the Nutanix Clusters™ solution makes it easy to seamlessly duplicate or extend workloads across your AWS infrastructure and private cloud. This is the second of a series of five blogs. Let’s discuss how to create on-demand elasticity that allows cloud bursting for changing resource needs!

Say you're a cloud or IT administrator for a retailer with national—perhaps international— reach. Demand in retail fluctuates seasonally, and making sure your infrastructure is the right size for seasonal and even daily requirements without running up costs unnecessarily is a never ending challenge. If a forecasted peak only lasts a short period and your average demand is much lower, you could be underusing a lot of your capital investment.

Ensuring On-Demand Elasticity Using Hybrid Cloud

The Nutanix annual Enterprise Cloud Index (ECI), which surveyed 3,400 IT leaders worldwide in 2020, found that 86 percent of enterprises consider hybrid cloud the ideal operating environment.

But hybrid IT, or hybrid cloud, is the most complex environment to manage. Each infrastructure platform is unique and creates siloed apps and data resources for the organization, and ultimately management nightmares for IT teams. You, as an IT or cloud administrator, must learn new tools, develop new skill sets, and access individual APIs for each cloud environment—all while maintaining existing on-prem infrastructure. You need to “keep the lights on,” on-prem and in the cloud, so to speak.

When teams invest time and money to meet temporary needs by embarking on projects like upskilling, rearchitecting applications, or creating network overlays to integrate clouds, it will seem like cloud “savings” are evaporating into thin air. But, building new capacity for temporary requirements doesn’t make sense for businesses. Supporting new applications or application scale by bursting to the cloud is more costly and complex than it needs to be.

Modern tools like the Nutanix Clusters make cloud bursting a reality. You can easily and seamlessly duplicate workloads across your private cloud and AWS infrastructure on-demand and only pay for extra compute resources when needed. Let’s look at how simplifying bursting to additional public clouds can be done in a retail environment, as an example.

Cloud Bursting in a Retail Environment

Retail must respond to seasonal activity. If you stay on top of what’s coming next and are ready to shift gears throughout the year, the demand fluctuation shouldn’t be disruptive.

With Nutanix Clusters, IT can burst capacity for peak periods, launch new workloads using cloud resources, and pull back when requirements slow down. Once a cluster is created on your AWS infrastructure using Nutanix Clusters, bursting workloads to the cloud-hosted cluster is straightforward. Please refer to our first blog of this series about how to create a Nutanix Clusters platform on the Amazon Web Services (AWS) public cloud.

Figure 1

Native network integration is a key feature of Nutanix Clusters. It allows you to use all of your existing networking setups in AWS. There’s no need to manage any network overlays—simply select a private subnet here, which will leverage the same network connectivity and eliminates the complexity with on-demand capacity bursting.

Additionally, no management VMs are necessary, which reduces complexity and costs. VMs can talk natively to cloud services without gateways or any packet translations for high performance and low latency.

Fiqure 2

Once you've provisioned the cluster, you can burst existing workloads in your private cloud to your Nutanix Clusters platform on-demand just before the seasonal activity, which peaks during the fourth calendar quarter with Black Friday and holiday sales. Typically, the following quarters see slower retail and online activity, but with spikes that reflect industry-specific sales peaks, such as back-to-school, spring and fall holidays, and so forth.

To add new bare-metal nodes on AWS to meet these new and temporary resource needs, you can increase the value for the Number of Hosts, e.g., from 1 to 3 or 5 to 8. Now you are allowed to use the total capacity of what you have on-prem, and you have newly added for the duration required. Once the need goes back to the original level, you can adjust the value in the Number of Hosts once again.

Watch this video for demonstration: Expand Your Clusters On-demand.

Figure 3

Creating a Dynamic Environment with Automation

If you want to take a more automated approach and create a dynamic environment, you can automate expanding your cluster with Prism Pro Playbooks. Using the below script in conjunction with Playbooks, we can automatically have Prism Central increase the number of nodes based on running out of memory or capacity.

#script - can use a script box on the website
#!/usr/local/bin/python
import hashlib
import hmac
import time
import requests
import base64
import json

# Client credentials
client_id = "************.img.frame.nutanix.com"
client_secret = "***********”
cluster_id ="0005AC9D-****-****-****-5F727B535EC9"
# Create signature
timestamp = int(time.time())
to_sign = "%s%s" % (timestamp, client_id)
signature = hmac.new(client_secret, to_sign, hashlib.sha256).hexdigest()
domain = prod_domain

# Prepare http request headers
headers = { "X-Frame-ClientId": client_id, "X-Frame-Timestamp": str(timestamp), "X-Frame-Signature": signature }

r = requests.get(domain + "/v1/clusters/" + cluster_id, headers=headers)

response = r.json()
#node = json.loads(response)
cap = response['capacity_settings'][0]['nodes_count']
newNodeCount = cap + 1

# Create the cluster
body = {
"capacity_settings": [
{
"instance_type_name": "z1d.metal",
"nodes_count": newNodeCount
}
]
}
#print body
print domain + '/v1/clusters/' + cluster_id + '/cluster_capacity'

#update the intent for more nodes cluster
increase = requests.post(domain + "/v1/clusters/" + cluster_id + "/cluster_capacity", headers=headers, json=body)



print increase #double check response
client_id and client_secret are going to come from the above step of creating an API user.

Once you have that sorted we can create a playbook in Prism Central.

Figure 4

There are two alerts we can configure for. We can configure it to take action based on running out of memory or running out of storage.

Figure 5

Figure 6

There are many different actions we can take, but we are going to use a VM to run our script. You can call the API directly or use PowerShell if you're more comfortable with that.

Figure 7

Now you’re all set for when you run out of memory or capacity for your cluster.

In addition to bursting to accommodate seasonal demand, you can add additional capacity on-demand to help with testing, development, or disaster recovery (DR). For example, you can choose to maintain a minimum number of nodes at all times on Nutanix Clusters on AWS, but at the time of failover, you can do one-click capacity bursts to meet your needs.

If you already have an AOS CBL license, you have Leap already included. With Leap you can run a script inside of a VM that does the same work mentioned above. With the DR use case, you can predefine how many nodes you want to run and hard code the number into your script.

Figure 8

In stage 1, we run the script to add the nodes and set a long enough delay so the nodes will be added to the cluster before we start restoring VMs. In this case, we set the delay to 40 mins.

Ensuring Cost Efficiency with Resource Hibernation

Nutanix Clusters allows you to switch off the resource usage so that you can use only what you need when you need it. The one-click Hibernate and Resume feature (in early access availability) enables your team to move clusters to an S3 bucket when resources are no longer in use. This will eliminate the Nutanix software licensing cost of the unused resources if you pay as you go.

As demand picks up, you can just as easily resume capacity by restoring your session exactly as you left it. If you want to minimize manual tasks, you can choose to automate Cluster hibernation—read this blog for more details. Hibernation can be the tool to support your cloud cost strategy. For improved cost efficiency, you can migrate your existing software licenses across any supported public or private clouds and maximize the utilization of your IT investment.

Next Steps

Today we walked you through how the operational bursting of applications and data to and between clouds can be simplified with Nutanix Clusters. Why is this important? It’s because Nutanix Clusters helps you avoid the often extensive delays in procuring resources (hardware and VMs) for your development, testing, and production teams by quickly provisioning capacity in public clouds from a centralized management plane.

While the example cited here focused on the retail industry, fluctuating demand also exists in other service industries. In fact, most organizations experience sharp resource needs in the short run related to new product development, market expansion, mergers and acquisition, one-off or seasonal projects. Retail historically gets the attention around holiday sales. Still, payments processing, delivery tracking, and customer service—to name a few industries — all peak and ebb business requirements around similar cycles.

Now that you have seen Nutanix Clusters in action, take a test drive to see how easily you can have your applications in your private cloud burst into a public cloud! You can access Nutanix Test Drive for free, without setup, through your web browser. Get a preview of a guided tour in this blog post.

Learn more about how Clusters can simplify cloud bursting from the following resources:

© 2021 Nutanix, Inc. All rights reserved. Nutanix, the Nutanix logo and all Nutanix product, feature and service names mentioned herein are registered trademarks or trademarks of Nutanix, Inc. in the United States and other countries. Other brand names mentioned herein are for identification purposes only and may be the trademarks of their respective holder(s). This post may contain links to external websites that are not part of Nutanix.com. Nutanix does not control these sites and disclaims all responsibility for the content or accuracy of any external site. Our decision to link to an external site should not be considered an endorsement of any content on such a site. This post may contain express and implied forward-looking statements, which are not historical facts and are instead based on our current expectations, estimates and beliefs. The accuracy of such statements involves risks and uncertainties and depends upon future events, including those that may be beyond our control, and actual results may differ materially and adversely from those anticipated or implied by such statements. Any forward-looking statements included herein speak only as of the date hereof and, except as required by law, we assume no obligation to update or otherwise revise any of such forward-looking statements to reflect subsequent events or circumstances.