Skip to content

Commit 68e543b

Browse files
feat: add hor autoscale docs
1 parent 6e672d1 commit 68e543b

File tree

4 files changed

+179
-14
lines changed

4 files changed

+179
-14
lines changed
Lines changed: 148 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,148 @@
1+
---
2+
myst:
3+
html_meta:
4+
description: Learn how autoscaling dynamically adjusts server resources based
5+
on CPU usage metrics, allowing efficient workload management without manual
6+
intervention. Configure thresholds, durations, and understand the workflow for
7+
horizontal autoscaling without downtime on Hypernode.
8+
title: How does horizontal Autoscaling work? | Hypernode
9+
---
10+
11+
# How does horizontal Autoscaling work
12+
13+
This article explains how Horizontal autoscaling works, what the requirements are and how you can enable it.
14+
15+
## How does it work
16+
17+
With horizontal autoscaling, additional Hypernodes will be added automatically to your main Hypernode at peak times. The extra Hypernodes will be used as PHP fpm workers.
18+
Since there are no configuration or IP changes needed, Horizontal autoscaling is zero-downtime.
19+
20+
For Horizontal autoscaling you can configure some conditions. If the conditions are met from the configured settings in the Control Panel, Horizontal autoscaling will be triggered.
21+
You can configure the following conditions:
22+
23+
- **CPU Load Threshold:** CPU load that is continuously monitored by the autoscaling agent. The percentage value you see is the actual load divided by the number of CPUs you have. For example, if your actual load is 2, but you have 4 CPUs, your CPU load percentage is 50%. The default setting is 70%.
24+
- **Minimum Duration in Minutes:** Minimum amount of time the server is overloaded before autoscaling gets triggered. We monitor your CPU load every minute; autoscaling will be triggered once the CPU load condition is met for the minimum amount of time set in the Control Panel. The default setting is 15 minutes.
25+
26+
## Horizontal autoscaling process
27+
28+
### Upscaling
29+
30+
Once the configured conditions are met and autoscaling is triggered, we spin up extra Hypernode(s) which meets the extra calculated amount of resources you need.
31+
We create a snapshot of your main Hypernode and attach that snapshot to the extra provisioned Hypernodes.
32+
All the services, such as MySQL, Elasticsearch and Redis, keep running on your original Hypernode. We add the additional Hypernodes as PHP-fpm workers and will handle the incoming requests.
33+
The load of the different autoscaling nodes will be balanced from your original Hypernode.
34+
35+
36+
If the Hypernodes remains overloaded post-autoscaling, the extra needed resources will be added to handle the traffic. The autoscaling trigger is determined based on these criteria.
37+
The greater of either:
38+
39+
- User-defined minimum duration for CPU threshold surpassing: Allows time to assess newly allocated resources' impact on CPU performance.
40+
- A cooldown period of 15 minutes: Ensures a minimum interval for reassessment when the user-defined duration is less than 15 minutes.
41+
42+
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. Autoscaling is capped at the biggest plan available on each cloud provider.
43+
44+
### Downscaling
45+
46+
If the monitor agent noticed if one Hypernode will be removed, the used resources will stay below the configured thresholds, the downscale operation will be triggered.
47+
Downscale will happen by detaching the autoscaling instances from the main Hypernode one by one.
48+
After a downscale operation has completed, there will be a cooldown of 15 minutes to monitor the behaviour of the newly available resources before downscale again.
49+
If the amount of used resources is still below the configured threshold, another downscale operation will be triggered.
50+
If there is need for extra resources instead, extra resources will be added again.
51+
52+
## Horizontal autoscaling requirements
53+
54+
Horizontal autoscaling is available on all the Falcon cloud plans (OpenStack).
55+
Next to the provider, horizontal autoscaling does have a couple of additional requirements.
56+
57+
### Supported CMS
58+
Horizontal autoscaling is available for Magento2.
59+
To make use of Horizontal autoscaling, there are a couple of other requirements the Hypernode and the application should met:
60+
61+
**System requirements:**
62+
### Operating system
63+
- The operating system of the Hypernode should be Debian Bookworm
64+
65+
### Enable and configure Varnish
66+
To make use of Horizontal autoscaling, Varnish should be enabled and configured on the Hypernode.
67+
You can check if Varnish is enabled on your Hypernode by running
68+
```console
69+
hypernode-systemctl settings varnish_enabled
70+
```
71+
Example output if Varnish is enabled:
72+
```console
73+
varnish_enabled is set to value True
74+
```
75+
76+
If Varnish is not enabled, you can [enable Varnish](../varnish/how-to-enable-varnish-on-hypernode.md) by following the documentation
77+
If varnish is enabled on your Hypernode, your Magento store should also be configured to make use of varnish.
78+
You can verify if the Varnish host is configured correctly by running the following command from the Magento root:
79+
```console
80+
php bin/magento config:show system/full_page_cache/varnish/backend_host
81+
```
82+
The output should show `varnish` as backend. If it is configured as something else (like `localhost` or `127.0.0.1`), you can update it by running which sets the backend host to `varnish` instead.
83+
```console
84+
php bin/magento config:set system/full_page_cache/varnish/backend_host varnish
85+
```
86+
87+
Aditionally make sure the IP range `10.0.0.0/24` is set to the `acl_purge` section in the Varnish VCL file. The `acl_purge` section should look something similar:loaded Varnish VCL.
88+
```console
89+
acl purge {
90+
"localhost";
91+
"10.0.0.0/24";
92+
}
93+
```
94+
95+
### Enable and configure Redis Persistent
96+
Redis persistent is another requirement before you can make use of Horizontal autoscaling.
97+
The persistent instance will be used to store the sessions so we can access the same sessions from the Horizontal autoscale Hypernodes.
98+
99+
You can check if Redis Persistent is enabled on your Hypernode by running
100+
```console
101+
hypernode-systemctl settings redis_persistent_instance
102+
```
103+
Example output if Redis Persistent is enabled:
104+
```console
105+
redis_persistent_instance is set to value True
106+
```
107+
108+
If Redis Persistent instance is not enabled, you can enable the second Redis instance for sessions you run the command:
109+
```console
110+
hypernode-systemctl settings redis_persistent_instance --value True
111+
```
112+
113+
Make sure Redis session is configured as [described](../../ecommerce-applications/magento-2/how-to-configure-redis-for-magento-2.md#configure-magento-2-to-use-redis-as-the-session-store) in our docs
114+
Please notice the Redis host in the setup documentation. The Redis host should be set to `redismaster` instead of `localhost` or `127.0.0.1`.
115+
116+
### Make sure Elasticsearch/Opensearch configured properly
117+
Please make sure Elasticsearch or Opensearch host is set to `elasticsearchmaster` in the Magento2 configuration file at `<magento_root>/app/etc/env.php`
118+
More information about [Elasticsearch o Hypernode](../../hypernode-platform/tools/how-to-use-elasticsearch-on-hypernode.md)
119+
120+
### Make sure RabbitMQ configured properly
121+
122+
Please make sure RabbitMQ host is set to `rabbitmqmaster` in the Magento2 configuration file at `<magento_root>/app/etc/env.php`
123+
More information about [RabbitMQ o Hypernode](../../best-practices/database/how-to-run-rabbitmq-on-hypernode.md)
124+
125+
### Make sure we use MySQL 5.7 or higher
126+
127+
The configured MySQL version should be 5.7 or above. You can check the enabled MySQL version by running the following command.
128+
129+
```console
130+
hypernode-systemctl settings mysql_version
131+
```
132+
133+
Example output if MySQL version is 8.0:
134+
```console
135+
mysql_version is set to value 8.0
136+
```
137+
If your MySQL version is still set to 5.6, you can concider [upgrade](../mysql/how-to-use-mysql-on-hypernode.md) the MySQL version to a supported version for autoscaling.
138+
139+
After the version validation, please verify the MySQL host is set to `mysqlmaster`. You can verify this by running `cat app/etc/env.php | grep -i mysql | grep -i host` from the magento root.
140+
You should see something similar to `'host' => 'mysqlmaster',`. If this is not the case please make sure the database connection host is set to `mysqlmaster` instead of `localhost` or `127.0.0.1` in the magento configuration file at `<magento_root>/app/etc/env.php`.
141+
142+
### Make sure the Hypernode is a production plan
143+
Unfortunately we don't support Horizontal autoscaling for development plans.
144+
145+
146+
## Enabling Horizontal Autoscaling
147+
148+
For detailed steps on enabling horizontal Autoscaling, please refer to our documentation: [How to enable vertical Autoscaling?](how-to-enable-vertical-autoscaling.md)

docs/hypernode-platform/autoscaling/how-does-autoscaling-work.md renamed to docs/hypernode-platform/autoscaling/how-does-vertical-autoscaling-work.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ myst:
55
on CPU usage metrics, allowing efficient workload management without manual
66
intervention. Configure thresholds, durations, and understand the workflow for
77
seamless autoscaling on Hypernode.
8-
title: How does Autoscaling work? | Hypernode
8+
title: How does vertical Autoscaling work? | Hypernode
99
---
1010

11-
# How does Autoscaling work?
11+
# How does vertical Autoscaling work?
1212

1313
Vertical autoscaling is triggered once the conditions are met from the configured settings in the Control Panel. You can configure the following:
1414

@@ -41,6 +41,6 @@ Simply turn off the autoscaling feature in your control panel. This prevents sub
4141

4242
Regardless of the number of times your Hypernode was autoscaled, you will go back to your initial plan after 24 hours from your initial upgrade.
4343

44-
## Enabling Autoscaling
44+
## Enabling vertical Autoscaling
4545

46-
For detailed steps on enabling Autoscaling, please refer to our documentation: [How to enable Autoscaling?](how-to-enable-autoscaling.md)
46+
For detailed steps on enabling Autoscaling, please refer to our documentation: [How to enable vertical Autoscaling?](how-to-enable-vertical-autoscaling.md)
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
myst:
3+
html_meta:
4+
description: Step-by-step instructions on enabling horizontal Autoscaling through the Control
5+
Panel
6+
title: How to enable horizontal Autoscaling? | Hypernode
7+
---
8+
9+
# How to Enable horizontal Autoscaling?
10+
11+
## What is horizontal Autoscaling?
12+
13+
Horizontal autoscaling in other words means upgrading the amount of resources when your Hypernode needs it, so you don’t need to worry about constant monitoring.
14+
15+
The amount of resources your Hypernode will upgrade with, is calculated by our agent based on the requirements.
16+
17+
The upgrade is effective as long the extra resources are needed and being used. For more technical overview you can check our docs [How Horizontal Autoscaling Works](how-does-horizontal-autoscaling-work.md).

docs/hypernode-platform/autoscaling/how-to-enable-autoscaling.md renamed to docs/hypernode-platform/autoscaling/how-to-enable-vertical-autoscaling.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
---
22
myst:
33
html_meta:
4-
description: Step-by-step instructions on enabling Autoscaling through the Control
4+
description: Step-by-step instructions on enabling vertical Autoscaling through the Control
55
Panel or command line
6-
title: How to enable Autoscaling? | Hypernode
6+
title: How to enable vertical Autoscaling? | Hypernode
77
---
88

9-
# How to Enable Autoscaling?
9+
# How to Enable vertical Autoscaling?
1010

11-
## What is Autoscaling?
11+
## What is vertical Autoscaling?
1212

1313
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.
1414

1515
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).
1616

17-
## How to enable Autoscaling?
17+
## How to enable vertical Autoscaling?
1818

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

21-
### How to enable Autoscaling in the Control Panel?
21+
### How to enable vertical Autoscaling in the Control Panel?
2222

2323
You can start using autoscaling by:
2424

@@ -32,7 +32,7 @@ After enabling Autoscaling feature, expect a 5min grace period before Autoscalin
3232

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

35-
## How to enable Autoscaling via command line?
35+
## How to enable vertical Autoscaling via command line?
3636

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

@@ -41,12 +41,12 @@ To allow using autoscaling via the command line, follow the steps below:
4141

4242
**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.
4343

44-
### Enable autoscaling via the CLI
44+
### Enable vertical autoscaling via the CLI
4545

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

49-
### Manage autoscaling tresholds via the CLI
49+
### Manage vertical autoscaling tresholds via the CLI
5050

5151
If you have enabled autoscaling, you can configure the thresholds when it is being autoscaled.
5252
This tresholds does have a default value:
@@ -61,7 +61,7 @@ hypernode-systemctl settings autoscale_trigger_load_percentage 80
6161
hypernode-systemctl settings autoscale_trigger_load_avg_minutes 50
6262
```
6363

64-
### Disable autoscaling via the CLI
64+
### Disable vertical autoscaling via the CLI
6565

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

0 commit comments

Comments
 (0)