in Product


Autoscaling in SingleStore Helios®

Aditya Shajil

Senior SE, Americas

SingleStore customers have long benefited from the ability to scale their apps seamlessly with Helios®  — our cloud-based, managed SaaS solution.

Autoscaling in SingleStore Helios®

These customers benefit from four key areas:

  1. Distributed, scale-out architecture. Petabyte scale, low-latency reads and writes across thousands of concurrent connections
  2. Decoupled storage + compute. Provides durability and high availability
  3. Compute workspaces. Share data across isolated workspaces
  4. Fast scaling. Quickly scale vCPU and RAM to adjust to spikey workloads

But it’s a no-brainer that modern, intelligent applications are dynamic. From SaaS applications with a variable number of users, to developers building applications and scaling down resources when not in use, customers only want to pay for what they need, when they need it. These dynamic usage patterns require databases that can adjust to changing workloads on-the-fly — without compromising performance or efficiency.

And that’s exactly why we released autoscaling in SingleStore Helios, a feature that automatically adjusts compute resources based on workload demand. This blog explores the advantages and easy setup of Autoscaling within SingleStore, highlighting how it ensures high availability, maintains optimal performance and provides cost-effective solutions by scaling resources up or down as needed. Whether dealing with sudden traffic spikes or maintaining steady growth, autoscaling in SingleStore offers a robust, flexible and efficient approach to modern database management.

Let’s start with the basics: what is a compute workspace in SingleStore Helios? A workspace is an independent deployment of compute resources that can be used to run a workload. This sits within an entity known as a workspace group — which is deployed in the cloud of your choice (we support AWS, Azure and GCP) and the region of your choice. Take a look at the deployment here:

  • My workspace group named Group 1 is deployed in AWS us-east-1
  • My workspace called saas-app is of a small S-00 size (2 vCPU + 16GB RAM)
  • I have the separation of compute and storage because I can detach and attach my database s2_dataset_tpch_c84d4c75 at any given point, as either a read/write or read-only attachment
  • I can spin up multiple workspaces in the same workspace group, and achieve separation of compute and compute by having shared data attached to different workspaces

Now what happens when my application experiences a burst of traffic that the S-00 can’t handle? This is where Autoscaling comes into play.

setting-up-autoscalingSetting up Autoscaling

Specify the maximum number of resources you want to provision

  • On your workspace, click on the three dots and navigate to “Edit Workspace Settings”
  • Scroll down and toggle the Autoscale slider to ON
  • Set guardrails by adjusting maximum compute to either 2x or 4x the compute resources (vCPU and RAM) of your base workspace size. NOTE: This does not scale your persistent cache (local disk)

Check resource utilization using Grafana

With built-in Grafana dashboards that can be accessed from the Helios portal, we can clearly identify spikes in resource utilization, like vCPU and RAM. As an example, let’s say my saas-app workspace suddenly gets hit with a large wave of user traffic. You can see the CPU utilization percentage spike up close to 100% here:

Monitor workspace activity to view autoscale job

When autoscaling senses that CPU or RAM has spiked, it will automatically kick off a job to scale the workspace to a size that can handle the workload, not exceeding your maximum specified threshold. These jobs can be viewed in Workspace Activity under Monitoring.

Validate workspace size

Navigate to the workspace tab — you should now see your workspace have a 2x or 4x scale factor depending on your workload resource utilization and max guardrail.

Autoscaling doesn’t just encompass scaling up; it also includes scaling down! If the resource utilization were to decrease back to average, the workspace gets autoscaled back down to the base size.

Management API

For customers that have predictable workload patterns, it’s quite simple to trigger scale jobs at set hours using a rest API instead of relying on the system to autoscale. The SingleStore Management API allows you to do exactly this by adjusting the scale factor using a simple PATCH request:

{
"scaleFactor": 2,
}

All Management API actions are governed by HTTP Bearer Authentication, ensuring only authorized users can access and perform operations securely.

scaling-alternativesScaling alternatives

You learned here about leveraging the powerful autoscaling feature, but scale mechanisms in SingleStore don’t stop there! Every customer workload is different — you might not need to dynamically scale or just scale compute. Here are some alternatives to consider:

  1. For storage-intensive workloads, you may want to scale just your persistent cache (local disk) instead of compute. You can 2x or 4x your cache using custom cache configuration
  2. For workloads that require an increase in both compute and storage, you may want to scale your entire workspace, which is what we call a full resize. This changes the base workspace size altogether (i.e. an S-00 to S-2)

Both operations can be triggered through the SingleStore Helios portal UI or Management API.

Customer examples

Leads2B

With a spikey, user-activity based workload across multiple time zones, Leads2B powers its sales prospecting SaaS app by leveraging autoscaling. They are able to scale both their writes and reads in real time, achieving 8M+ inserts/updates per day and sub-second complex OLAP query performance at varying concurrencies throughout the day.

Antuit

Antuit powers its AI-driven demand forecast tool with SingleStore Helios, leveraging its full resize capabilities to scale their production workspaces down during weekends and after-business hours. This seamless scaling design has allowed them to save upward of 30% in total cost of ownership (TCO) on Helios.

conclusionConclusion

Autoscaling in SingleStore Helios represents a significant advancement in database management, providing a seamless, efficient and cost-effective solution to dynamically changing workloads. Other database technologies give you the option to only scale vertically, just reads or writes or flat out can’t scale for concurrency and performance while maintaining relational logic. 

SingleStore Helios ensures your applications remain highly available and performant, regardless of traffic fluctuations. Whether you are dealing with sudden spikes in user activity or planning for consistent growth, autoscaling offers the flexibility and reliability needed to meet these challenges head on. Embrace the power of autoscaling in SingleStore Helios and experience a new level of database scalability and efficiency.

To see autoscaling in action, try SingleStore for free or speak to an engineer to discuss whether SingleStore is the right database platform for you.


Share