Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions apps/docs/content/alpine/how-to/controls.mdx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
title: Stop and start Alpine service
description: Learn how you can stop and start your Alpine service on Zerops.
title: Stop, start and delete Alpine service
description: Learn how you can stop, start and delete your Alpine service on Zerops.
---

import { SetVar } from '/src/components/content/var';
import ServiceContent from '/src/components/content/start-stop.mdx';
import ServiceContent from '/src/components/content/manage.mdx';

<SetVar name="service" value="alpine" />
<SetVar name="serviceDisplay" value="Alpine" />
Expand Down
11 changes: 0 additions & 11 deletions apps/docs/content/alpine/how-to/delete.mdx

This file was deleted.

6 changes: 3 additions & 3 deletions apps/docs/content/bun/how-to/controls.mdx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
title: Stop and start Bun service
description: Learn how you can stop and start your bun service in Zerops.
title: Stop, start and delete Bun service
description: Learn how you can stop, start and delete your bun service in Zerops.
---

import { SetVar } from '/src/components/content/var';
import ServiceContent from '/src/components/content/start-stop.mdx';
import ServiceContent from '/src/components/content/manage.mdx';

<SetVar name="service" value="bun" />
<SetVar name="serviceDisplay" value="Bun" />
Expand Down
11 changes: 0 additions & 11 deletions apps/docs/content/bun/how-to/delete.mdx

This file was deleted.

6 changes: 3 additions & 3 deletions apps/docs/content/deno/how-to/controls.mdx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
title: Stop and start Deno service
description: Learn how you can stop and start your deno service in Zerops.
title: Stop, start and delete Deno service
description: Learn how you can stop, start and delete your deno service in Zerops.
---

import { SetVar } from '/src/components/content/var';
import ServiceContent from '/src/components/content/start-stop.mdx';
import ServiceContent from '/src/components/content/manage.mdx';

<SetVar name="service" value="deno" />
<SetVar name="serviceDisplay" value="Deno" />
Expand Down
11 changes: 0 additions & 11 deletions apps/docs/content/deno/how-to/delete.mdx

This file was deleted.

6 changes: 3 additions & 3 deletions apps/docs/content/dotnet/how-to/controls.mdx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
title: Stop and start .NET service
description: Learn how you can stop and start your dotnet service in Zerops.
title: Stop, start and delete .NET service
description: Learn how you can stop, start and delete your dotnet service in Zerops.
---

import { SetVar } from '/src/components/content/var';
import ServiceContent from '/src/components/content/start-stop.mdx';
import ServiceContent from '/src/components/content/manage.mdx';

<SetVar name="service" value="dotnet" />
<SetVar name="serviceDisplay" value=".NET" />
Expand Down
11 changes: 0 additions & 11 deletions apps/docs/content/dotnet/how-to/delete.mdx

This file was deleted.

6 changes: 3 additions & 3 deletions apps/docs/content/elixir/how-to/controls.mdx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
title: Stop and start Elixir service
description: Learn how you can stop and start your Elixir service in Zerops.
title: Stop, start and delete Elixir service
description: Learn how you can stop, start and delete your Elixir service in Zerops.
---

import { SetVar } from '/src/components/content/var';
import ServiceContent from '/src/components/content/start-stop.mdx';
import ServiceContent from '/src/components/content/manage.mdx';

<SetVar name="service" value="elixir" />
<SetVar name="serviceDisplay" value="Elixir" />
Expand Down
11 changes: 0 additions & 11 deletions apps/docs/content/elixir/how-to/delete.mdx

This file was deleted.

102 changes: 53 additions & 49 deletions apps/docs/content/features/scaling-ha.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -96,15 +96,27 @@ This flexibility lets you plan scaling strategies upfront or adapt them as requi

Resource management in Zerops focuses on efficiently allocating and adjusting CPU, RAM, and disk resources within individual containers based on actual usage patterns.

### CPU Options
These resource management capabilities apply to **runtime** services, **databases**, **shared storage**, and **Linux containers** (Alpine and Ubuntu).

:::note
Docker services do not support automatic vertical scaling. Resources for Docker services are fixed at the values set manually and do not automatically adjust based on usage.
:::

:::tip Disable Scaling for Specific Resources
To prevent automatic scaling of specific resources, simply set identical minimum and maximum values for CPU, RAM, or Disk.
:::

### CPU Settings

#### CPU Mode

Two CPU allocation modes are available for any service:

#### Shared CPU
**Shared CPU**

Shared CPU provides a physical CPU core shared with up to 10 other applications. Performance varies depending on neighbors, ranging from 1/10 to 10/10 power. This option is cost-effective for non-critical workloads, development, and testing environments.

#### Dedicated CPU
**Dedicated CPU**

Dedicated CPU gives exclusive access to a full physical CPU core(s), ensuring consistent and predictable performance. This option is ideal for production environments and CPU-intensive applications.

Expand All @@ -114,57 +126,60 @@ CPU mode can be changed (once per hour) as needed.

See the [pricing](/company/pricing#resource-pricing) for the difference between CPU modes.

### Vertical Scaling
#### Minimum and Maximum CPU Cores

Vertical scaling adjusts individual resources (CPU, RAM, Disk) within existing containers. When a container needs more/less power, allocated resources are increased/decreased instead of creating a new/removing container.
Set boundaries for CPU core allocation. Zerops will scale CPU resources within these limits based on actual usage.

This is the preferred scaling method and is attempted first before horizontal scaling.
#### Start CPU Core Count

These resource management capabilities apply to **runtime** services, **databases**, **shared storage**, and **Linux containers** (Alpine and Ubuntu).

:::note
Docker services do not support vertical scaling. Resources for Docker services are fixed at the values set manually and do not automatically adjust based on usage.
:::
Determines how many CPU cores are allocated when containers start:
- Default: 2 cores
- Applies to both dedicated and shared CPU modes
- Higher values provide more processing power during application initialization
- After startup, resources are automatically adjusted based on actual usage and limits

### Fine-Tuning Resource Allocation
#### CPU Scaling Thresholds

Resource allocation can be configured through basic and advanced settings:
For services using [dedicated CPU](#cpu-mode) only, CPU scaling is controlled by:

#### Minimum and Maximum Resources (Basic)
**Min. Free CPU Cores (%)**
- Scale-up is triggered when free capacity drops below a fixed fraction of a single CPU core
- Default: 10%
- Set as a percentage of a single core's capacity
- Example: Setting to 20% means that with one core, at least 20% of that core should remain free

Boundaries for CPU cores, RAM, and disk space can be established.
**Dynamic Min. Free Total Core Percent**
- Scale-up is triggered when total free capacity across all cores falls below a percentage of total capacity
- Default: 0% (disabled)
- Dynamically adjusts as the number of cores changes
- Ideal for accommodating varying load distributions
- Example: 20% setting ensures at least 20% of the combined capacity of all cores remains free

:::tip Resource Scaling Control
To prevent scaling of specific resources, simply set identical minimum and maximum values for CPU, RAM, or Disk.
:::
### RAM Settings

#### Start CPU Core Count (Advanced)
#### Minimum and Maximum RAM

How many CPU cores should be allocated when containers start to ensure reliable and fast startup:
- Default: 2 cores
- Applies to both dedicated and shared CPU modes
- Higher values provide more processing power during application initialization
- After startup, resources are automatically adjusted based on actual usage and limits
Set boundaries for RAM allocation. Zerops will scale RAM within these limits based on actual usage.

#### RAM Scaling Thresholds (Advanced)
#### RAM Scaling Thresholds

RAM usage is monitored every 10 seconds to ensure optimal performance. The minimum free RAM settings serve multiple important purposes: they prevent Out of Memory (OOM) errors, provide space for kernel disk caching (which improves application performance), and maintain a buffer for sudden memory demands.

Swap is enabled for all containers to help prevent OOM errors, but proper minimum free RAM configuration is still essential—especially for services that use large amounts of RAM or benefit from kernel disk caching. Without sufficient free memory, performance may degrade due to increased disk access.

Two threshold types determine RAM scaling:

1. **Minimum Free RAM (absolute value in GB)**
- Specifies an absolute threshold for free RAM
- Additional memory is triggered when available RAM falls below this fixed amount
- Default: 0.0625 GB (64 MB) for most services
- Ideal for maintaining system stability and responsiveness
**Minimum Free RAM (absolute value in GB)**
- Specifies an absolute threshold for free RAM
- Additional memory is triggered when available RAM falls below this fixed amount
- Default: 0.0625 GB (64 MB) for most services
- Ideal for maintaining system stability and responsiveness

2. **Minimum Free RAM (% of Granted)**
- Establishes a dynamic threshold based on a percentage of total granted memory
- Default: 0% (disabled)
- The buffer scales proportionally as total memory increases
- Particularly useful for handling varying loads
**Minimum Free RAM (% of Granted)**
- Establishes a dynamic threshold based on a percentage of total granted memory
- Default: 0% (disabled)
- The buffer scales proportionally as total memory increases
- Particularly useful for handling varying loads

:::note
Whichever setting provides more free memory is used.
Expand All @@ -180,22 +195,11 @@ Whichever setting provides more free memory is used.
plays-inline="true"
/>

#### CPU Scaling Thresholds (Advanced)

For services using [dedicated CPU](#dedicated-cpu) cores only, CPU scaling is controlled by:
### Disk Settings

1. **Min. Free CPU Cores (%)**
- Scale-up is triggered when free capacity drops below a fixed fraction of a single CPU core
- Default: 10%
- Set as a percentage of a single core's capacity
- Example: Setting to 20% means that with one core, at least 20% of that core should remain free
#### Minimum and Maximum Disk

2. **Dynamic Min. Free Total Core Percent**
- Scale-up is triggered when total free capacity across all cores falls below a percentage of total capacity
- Default: 0% (disabled)
- Dynamically adjusts as the number of cores changes
- Ideal for accommodating varying load distributions
- Example: 20% setting ensures at least 20% of the combined capacity of all cores remains free
Set boundaries for disk space allocation. Zerops will scale disk space within these limits based on actual usage.

### Resource Scaling Behavior

Expand Down
6 changes: 3 additions & 3 deletions apps/docs/content/gleam/how-to/controls.mdx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
title: Stop and start Gleam service
description: Learn how you can stop and start your Gleam service in Zerops.
title: Stop, start and delete Gleam service
description: Learn how you can stop, start and delete your Gleam service in Zerops.
---

import { SetVar } from '/src/components/content/var';
import ServiceContent from '/src/components/content/start-stop.mdx';
import ServiceContent from '/src/components/content/manage.mdx';

<SetVar name="service" value="gleam" />
<SetVar name="serviceDisplay" value="Gleam" />
Expand Down
11 changes: 0 additions & 11 deletions apps/docs/content/gleam/how-to/delete.mdx

This file was deleted.

6 changes: 3 additions & 3 deletions apps/docs/content/go/how-to/controls.mdx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
title: Stop and start Go service
description: Learn how you can stop and start your go service in Zerops.
title: Stop, start and delete Go service
description: Learn how you can stop, start and delete your go service in Zerops.
---

import { SetVar } from '/src/components/content/var';
import ServiceContent from '/src/components/content/start-stop.mdx';
import ServiceContent from '/src/components/content/manage.mdx';

<SetVar name="service" value="go" />
<SetVar name="serviceDisplay" value="Go" />
Expand Down
11 changes: 0 additions & 11 deletions apps/docs/content/go/how-to/delete.mdx

This file was deleted.

6 changes: 3 additions & 3 deletions apps/docs/content/java/how-to/controls.mdx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
title: Stop and start Java service
description: Learn how you can stop and start your java service in Zerops.
title: Stop, start and delete Java service
description: Learn how you can stop, start and delete your java service in Zerops.
---

import { SetVar } from '/src/components/content/var';
import ServiceContent from '/src/components/content/start-stop.mdx';
import ServiceContent from '/src/components/content/manage.mdx';

<SetVar name="service" value="java" />
<SetVar name="serviceDisplay" value="Java" />
Expand Down
11 changes: 0 additions & 11 deletions apps/docs/content/java/how-to/delete.mdx

This file was deleted.

Loading