Categories

Scale your cluster in Heroku

When it’s time to scale, you can easily upgrade your shared plan, or migrate to a dedicated cluster.
Last updated
July 7, 2023

When it’s time to scale, you can easily upgrade your shared plan, or migrate to a dedicated cluster.

How to Update Your Cluster Plan

Note on plan changes

Most plan changes take effect instantly. However, if you’re trying to upgrade or downgrade across an architecture class, there will be a delay in processing.

Updating your cluster plan with Heroku is fairly simple. You can do this in either of two ways:

  1. Through the Heroku CLI tool
  2. Through the Heroku UI - your app dashboard

Using the Command Line

You can view all of our available plans for Heroku users on the Bonsai Heroku Add-on page:

From there, choose the plan you’d like to change your cluster to and note the plan slug. For example, our <span class="inline-code"><pre><code>Standard SM</code></pre></span> has a plan slug of <span class="inline-code"><pre><code>standard-sm</code></pre></span>, our <span class="inline-code"><pre><code>Private Compute LG</code></pre></span> has a slug of <span class="inline-code"><pre><code>private-compute-lg</code></pre></span>, etc. Open up your project in a terminal and run:

If you have several applications with Bonsai Add-ons, you can specify which one you would like to upgrade or downgrade with the <span class="inline-code"><pre><code>-a</code></pre></span> flag:

<div class="code-snippet-container"><a fs-copyclip-element="click-2" href="#" class="btn w-button code-copy-button" title="Copy">
<img class="copy-image" src="https://global-uploads.webflow.com/63c81e4decde60c281417feb/6483934eeefb356710a1d2e9_icon-copy.svg" loading="lazy" alt="">
<img class="copied-image" src="https://assets-global.website-files.com/63c81e4decde60c281417feb/64839e207c2860eb9e6aa572_icon-copied.svg" loading="lazy" alt="">
</a>
<div class="code-snippet">
<pre><code fs-codehighlight-element="code" fs-copyclip-element="copy-this-2" class="hljs language-javascript">$ heroku addons:upgrade bonsai:standard-sm -a mycoolelasticsearchapp</code></pre>
</div>
</div>

Using the Heroku app Dashboard

Log into your Heroku account and open your app dashboard. In this example, the app is called <span class="inline-code"><pre><code>mycoolelasticsearchapp</code></pre></span>:

Click on the Resources tab to view your Add-ons:

You’ll see a list of your Add-ons, with a carot menu on the far right side.

Clicking on the carot icon will open up a dropdown menu. Select <span class="inline-code"><pre><code>Modify Plan</code></pre></span> to open a modal, and you can choose a new plan for your cluster:

How Heroku Handles Billing

Heroku handles all of the billing, and prorates by the second.

A contrived example: a customer signs up for a $50/mo plan at 00:00:00, then decides to upgrade to a $150 plan at 00:10:30, then downgrades back down to a $50 plan at 01:00:00, then destroys it at 02:45:00. The customer’s bill would be roughly calculated as:

  • 630s on a $50/mo plan = $0.012
  • 2970s on a $150/mo plan = $0.17
  • 6300s on a $50/mo plan = $0.12
  • Total: $0.30

This amount would be added to the customer’s next invoice from Heroku.

Migrating Across Architectures

Bonsai offers two main architecture classes: multi-tenant and single tenant. The multi-tenant class – sometimes called “shared” – is designed to allow clusters to share hardware resources while still being sandboxed from one another. This allows us to provide unparalleled performance per dollar in a way that’s also extremely affordable.

The single tenant class – sometimes called “dedicated” – maps one cluster to a private set of hardware resources. Because these resources are not shared with any other cluster, single tenant configurations provide maximum performance for a slightly higher price.

Plan changes within the multi-tenant class take place instantly. However, moving a cluster from one class to another will take some time. This is because data will need to be moved across a network boundary and search resources may need to be created.

In other words, if a customer upgrades from a “Shared” plan to a “Dedicated,” the Bonsai app will need to provision and configure new private servers, wait for them to come online and pass health checks, then migrate their cluster’s data out of the multi-tenant class and into their new single tenant class.

Alternately, if a customer downgrades from a “Dedicated” plan to a “Shared” plan, a data migration will need to be performed, and the old servers torn down.

The time required for these migrations can vary. If you have questions or concerns, please send us a note at support@bonsai.io

View code snippet
Close code snippet