Skip to content

Commit

Permalink
Merge pull request #224 from ByteInternet/autoscaling_documentation
Browse files Browse the repository at this point in the history
Autoscaling documentation
  • Loading branch information
alejandrogarza authored Dec 11, 2023
2 parents fee5f51 + 53a1ca4 commit 4cb872a
Show file tree
Hide file tree
Showing 3 changed files with 146 additions and 0 deletions.
20 changes: 20 additions & 0 deletions docs/hypernode-platform/autoscaling.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
myst:
html_meta:
description: This table of contents gives you a summary of all Hypernode platform
knowledge base articles that include information about autoscaling.
title: Autoscaling | Hypernode platform
redirect_from:
- /en/hypernode/autoscaling/
---

# Autoscaling

```{toctree}
---
caption: Table of Contents
maxdepth: 1
glob:
---
autoscaling/*
```
59 changes: 59 additions & 0 deletions docs/hypernode-platform/autoscaling/how-does-autoscaling-work.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
---
myst:
html_meta:
description: Learn how autoscaling dynamically adjusts server resources based
on CPU usage metrics, allowing efficient workload management without manual
intervention. Configure thresholds, durations, and understand the workflow for
seamless autoscaling on Hypernode.
title: How does Autoscaling work? | Hypernode
---

# How does Autoscaling work?

## Purpose

Autoscaling ensures dynamic server resource adjustments based on CPU usage metrics, efficiently managing workload demands without manual intervention. Once triggered, boosted state lasts for a 24-hour period.

## Supported providers:

Autoscaling is available for Combell Openstack and AWS cloud hosting providers.

## Configuration Parameters

In the control panel or with CLI tool, users can define autoscaling conditions based on CPU load thresholds and minimum duration to tailor actions to their workload demands:

- **CPU Load Threshold:** Specifies the CPU load percentage that triggers autoscaling using a range slider.
- **Minimum Duration:** Determines the minimum duration, in minutes, for the CPU load to exceed the threshold to activate autoscaling.

## Autoscaling Triggering Process

- **Continuous Monitoring:** The autoscaling agent continually monitors your application's CPU load.
- **Activation Conditions:** Autoscaling is triggered if the CPU load surpasses the defined threshold and duration criteria set by the user or default values that were set when the feature was enabled.

## Autoscaling Workflow

- **Initial Cooldown period:** A 5-minute cooldown period after enabling autoscaling prevents rapid scaling due to sudden spikes.
- **Scaling Actions:** Autoscaling automatically upgrades the plan to the next available tier within the same provider, catering to increased demand. The upgraded plan remains effective for 24 hours before reverting to the original configuration.

## Continued Autoscaling Process:

If the server remains overloaded post-autoscaling, the next autoscaling trigger is determined based on these criteria:

- **The greater of either**:
- **User-defined minimum duration for CPU threshold surpassing**: Allows time to assess newly allocated resources' impact on CPU performance.
- **A fallback duration of 15 minutes**: Ensures a minimum interval for reassessment when the user-defined duration is less than 15 minutes.

This approach selects the longer duration between user-defined settings or the fallback duration before initiating the next autoscaling event. It ensures adequate time for evaluating resource changes on CPU performance.

To halt continued autoscaling behavior, simply turn off the autoscaling feature in your control panel. This prevents subsequent autoscaling triggers after the initial action.

**Important to know:**

- For the next 24 hours, plan adjustments are restricted. If necessary, please contact support for assistance.
- If there are still insufficient resources and the conditions are met, the system will initiate another autoscaling process with a cooldown period of 5 minutes.
- It will scale up to the largest plan available within the same provider.
- Downscaling takes place within 24 hours from the initial autoscaling event.

## Enabling Autoscaling

For detailed steps on enabling Autoscaling, please refer to our documentation: [How to enable Autoscaling?](how-to-enable-autoscaling.md)
67 changes: 67 additions & 0 deletions docs/hypernode-platform/autoscaling/how-to-enable-autoscaling.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
---
myst:
html_meta:
description: Step-by-step instructions on enabling Autoscaling through the Control
Panel or command line
title: How to enable Autoscaling? | Hypernode
---

# How to Enable Autoscaling?

## What is Autoscaling?

Vertical autoscaling in other words means upgrading your plan automatically when your server needs it, so you don’t need to worry about constant monitoring.

Your plan will be upgraded to the next possible plan within the same provider, increasing your resources while keeping the disk size the same. The upgrade is effective for 24h, after which your Hypernode will return to your regular plan. For more technical overview you can check our docs [How Autoscaling Works](how-does-autoscaling-work.md).

## How to enable Autoscaling?

You can enable Autoscaling two ways: in the Control Panel or directly via command line.

### How to enable Autoscaling in the Control Panel?

You can start using autoscaling by:

1. Log in to [Control Panel](https://my.hypernode.com).
1. Navigate to Hypernodes > Autoscaling.
1. Enable autoscaling.
1. Optionally configure the conditions.

After enabling Autoscaling feature, expect a 5min grace period before Autoscaling takes effect.

Now, rest easy knowing that your server will automatically handle overloads.

## How to enable Autoscaling via command line?

To allow using autoscaling via the command line, follow the steps below:

- Navigate go the Change plan page.
- Click on the CLI tab, enable plan changes via the CLI.

**Please note:** when enabled, **everyone who has SSH access can enable and configure autoscaling from the CLI**, even if they are not the Owner or Admin.

### Enable autoscaling via the CLI

To enable autoscaling via the CLI, you can run the following command:
`hypernode-systemctl autoscaling --enable`

### Manage autoscaling tresholds via the CLI

If you have enabled autoscaling, you can configure the thresholds when it is being autoscaled.
This tresholds does have a default value:

- autoscale_trigger_load_percentage **default: 70**
- autoscale_trigger_load_avg_minutes **default: 15**

If you want to change the default settings, you can use the commands below:

```
hypernode-systemctl settings autoscale-trigger-load-percentage 80
hypernode-systemctl settings autoscale-trigger-load-avg-minutes 50
```

### Disable autoscaling via the CLI

If you want to disable autoscaling via the CLI, you can run `hypernode-systemctl autoscaling --disable`.

**Please note:** if you enable autoscaling the next time, the last configured settings will be used.

0 comments on commit 4cb872a

Please sign in to comment.