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
332 changes: 143 additions & 189 deletions apps/docs/content/docker/overview.mdx

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion apps/docs/content/features/pipeline.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ For [manual deployments](#manual-deploy-using-zerops-cli) using Zerops CLI, the
Zerops uses the stored artifact to deploy identical versions of your application whenever a new container starts:

- During new application version deployments
- When applications [scale horizontally](/features/scaling#horizontal-scaling-runtime-services-linux-containers-and-docker)
- When applications [scale horizontally](/features/scaling#horizontal-scaling-runtime-services-and-linux-containers)
- When runtime containers fail and new containers start automatically

### First deploy
Expand Down
43 changes: 13 additions & 30 deletions apps/docs/content/features/scaling.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,12 @@ Docker services do not support automatic vertical scaling. Resource values can b
:::

#### **Container Architecture**
- **For Runtime Services, Linux Containers, and Docker:** Horizontal Scaling (dynamic container count)
- Adds or removes containers/VMs based on load
- **For Runtime Services and Linux Containers:** Horizontal Scaling (dynamic container count)
- Adds or removes containers based on load
- Requires applications to be designed for HA operation
- Container/VM creation limits can be controlled
- Docker containers run in VMs rather than native containers
- Container creation limits can be controlled

- **For Docker:** a fixed number of VMs, see [Fixed Resource Allocation](#fixed-resource-allocation-docker-services)

- **For Databases & SeaweedFS:** High Availability Mode (fixed container count)
- Single Container OR Multi-Container HA configuration
Expand Down Expand Up @@ -68,7 +69,7 @@ Docker services do not support automatic vertical scaling. Resource values can b
<td className="w-fit text-center">✓</td>
<td className="w-fit text-center">Fixed # of containers</td>
<td className="w-fit text-center">Fixed # of containers</td>
<td className="w-fit text-center">✓</td>
<td className="w-fit text-center">Fixed # of VMs</td>
</tr>
<tr>
<td className="w-fit font-semibold whitespace-nowrap">High Availability</td>
Expand Down Expand Up @@ -274,14 +275,14 @@ Below are the parameters that control this behavior across all services that sup

Container architecture in Zerops defines how services are distributed across containers. Different service types use fundamentally different approaches:

1. **Horizontal Scaling** (Runtime Services, Linux Containers, and Docker)
1. **Horizontal Scaling** (Runtime Services and Linux Containers)
2. **Deployment Modes** (Databases and SeaweedFS)

### Horizontal Scaling (Runtime Services, Linux Containers, and Docker)
### Horizontal Scaling (Runtime Services and Linux Containers)

Horizontal scaling adds or removes entire containers (or VMs for Docker) as demand fluctuates.
* When vertical scaling reaches its defined maximum, new containers/VMs are automatically added to handle additional load.
* As demand decreases, containers/VMs are gradually removed to optimize resource usage.
Horizontal scaling adds or removes entire containers as demand fluctuates.
* When vertical scaling reaches its defined maximum, new containers are automatically added to handle additional load.
* As demand decreases, containers are gradually removed to optimize resource usage.

:::important HA-ready Applications
For applications to work properly across multiple containers, they must be designed to be HA-ready.
Expand Down Expand Up @@ -357,25 +358,7 @@ In HA mode, when a container or physical machine fails, recovery is handled auto

### Fixed Resource Allocation (Docker Services)

Docker services in Zerops operate differently from other service types:

#### Docker Service Characteristics

- **VM-Based Deployment**: Docker services run in virtual machines rather than containers
- **Fixed Resources**: Unlike other services, Docker services do not support automatic vertical scaling
- **User-Defined Resources**: Resources are set at creation and remain fixed until manually changed
- **VM Count Changes**: The number of VMs can be changed, but this requires a VM restart
- **No Automatic Scaling**: Resource levels do not automatically adjust based on usage

**Important Considerations for Docker Services:**
- Initial resource values should be chosen carefully, as they cannot automatically scale
- Planning for expected peak loads is important when setting resource values
- Runtime services or Linux containers should be considered instead if dynamic scaling is essential
- VM restarts cause temporary service disruption when changing VM count or resources

:::warning
Docker services use fixed resources that do not automatically scale. Sufficient resources should be allocated at creation to handle expected workload. Additionally, disk space for Docker services can only be increased, not decreased without recreation of the service.
:::
Docker services run in VMs with fixed resources and a fixed number of VMs, see [Docker resources and scaling](/docker/overview#resources-and-scaling).

## Monitoring Your Infrastructure

Expand Down Expand Up @@ -437,7 +420,7 @@ These graphs help understand application resource needs, identify usage patterns
* **Issue:** Docker service experiencing performance issues or crashes.
* **Possible Cause:** Fixed resources inadequate for actual workload.
* **Solution:**
- Since Docker services don't support automatic vertical scaling, a new service with higher resource allocations may be needed
- Raise the fixed resources manually, which restarts the VM
- Consider migrating to a runtime service or Linux container if dynamic resource scaling is needed

*Need help implementing scaling in your project? Join our [Discord community](https://discord.gg/zerops) where our team and other Zerops users can assist you!*
6 changes: 3 additions & 3 deletions apps/docs/content/references/networking/ssh.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Database services, message brokers, and object storage are **not accessible** vi
:::warning Non-Persistent Changes
SSH connections should not be used for making persistent changes to your service:

- In [HA mode](/features/scaling#horizontal-scaling-runtime-services-linux-containers-and-docker), changes via SSH affect only the current container
- In [HA mode](/features/scaling#horizontal-scaling-runtime-services-and-linux-containers), changes via SSH affect only the current container
- Container replacements or scaling events will deploy the original application version
- For persistent changes across all containers, use:
- [`run.prepareCommands`](/zerops-yaml/specification#preparecommands--1)
Expand Down Expand Up @@ -82,7 +82,7 @@ ssh node-id-1.runtime.app.zerops
```

:::note
When using [HA mode](/features/scaling#horizontal-scaling-runtime-services-linux-containers-and-docker), connecting to the service hostname will route you to a random container within that service.
When using [HA mode](/features/scaling#horizontal-scaling-runtime-services-and-linux-containers), connecting to the service hostname will route you to a random container within that service.
:::

#### Container Naming Conventions
Expand All @@ -92,7 +92,7 @@ Each container in your project has a unique hostname following these patterns:
- Format 1: `node-id-<number>.runtime.app.zerops`
- Format 2: `node<number>.runtime.app.zerops`

When your application [scales horizontally](/features/scaling#horizontal-scaling-runtime-services-linux-containers-and-docker):
When your application [scales horizontally](/features/scaling#horizontal-scaling-runtime-services-and-linux-containers):
- New containers receive incremental hostnames
- Decommissioned container hostnames are not recycled
- You might see non-sequential container numbers (e.g., `node-id-5` and `node-id-12`)
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/content/swarm/how-to/create.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ services:
zcli project service-import zerops-import.yaml
```

The VM type takes fixed resource values in place of ranges, the same way the [Docker service](/docker/overview#scaling-operations) does:
The VM type takes fixed resource values in place of ranges, the same way the [Docker service](/docker/overview#resources-and-scaling) does:

```yaml title="zerops-import.yaml"
services:
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/src/components/content/scaling.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ More details on [Disk Settings](/features/scaling#disk-settings).
**Multiple containers** (maximum > 1): Can provide high availability for production environments, but only if your <Var name="serviceDisplay" /> application is properly designed for it. Each container runs on a different physical server for redundancy. Your application must be stateless and avoid storing data in local files to work properly across multiple containers.

:::info Read More
More details on [Horizontal Scaling](/features/scaling#horizontal-scaling-runtime-services-linux-containers-and-docker).
More details on [Horizontal Scaling](/features/scaling#horizontal-scaling-runtime-services-and-linux-containers).
:::

## Monitor usage
Expand Down
28 changes: 14 additions & 14 deletions apps/docs/static/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -165,30 +165,30 @@
"bun": {
"default": "1.3",
"base": [
["bun@1.3.9", "bun@1.3", "bun@latest"],
["bun@1.2.2", "bun@1.2"],
["bun@1.3", "bun@latest"],
["bun@1.2"],
["bun@nightly"],
["bun@canary"],
["bun@1.1.34", "bun@1.1(Ubuntu only)"]
["bun@1.1(Ubuntu only)"]
],
"import": [
["bun@1.3.9", "bun@1.3", "bun@latest"],
["bun@1.2.2", "bun@1.2"],
["bun@1.3", "bun@latest"],
["bun@1.2"],
["bun@nightly"],
["bun@canary"],
["bun@1.1.34", "bun@1.1(Ubuntu only)"]
["bun@1.1(Ubuntu only)"]
],
"readable": ["1.3", "1.2", "1.1.34 (Ubuntu only)", "nightly", "canary"]
"readable": ["1.3", "1.2", "1.1 (Ubuntu only)", "nightly", "canary"]
},
"deno": {
"default": "2.0",
"base": [
["deno@2.0.0", "deno@2", "deno@latest"],
["deno@1.45.5", "deno@1"]
["deno@2.0", "deno@2", "deno@latest"],
["deno@1.45", "deno@1"]
],
"import": [
["deno@2.0.0", "deno@2", "deno@latest"],
["deno@1.45.5", "deno@1"]
["deno@2.0", "deno@2", "deno@latest"],
["deno@1.45", "deno@1"]
],
"readable": ["2.0","1.45"]
},
Expand All @@ -197,15 +197,15 @@
"base": [
["elixir@1.16", "elixir@1", "elixir@latest"]
],
"import": [["elixir@1", "elixir@1.16", "elixir@1.16.2"]],
"import": [["elixir@1.16", "elixir@1"]],
"readable": ["1.16"]
},
"gleam": {
"default": "1.5",
"base": [
["gleam@1.5", "gleam@1", "gleam@latest"]
],
"import": [["gleam@1", "gleam@1.5", "gleam@1.5.1"]],
"import": [["gleam@1.5", "gleam@1"]],
"readable": ["1.5"]
},
"java": {
Expand Down Expand Up @@ -259,7 +259,7 @@
["docker@26.1", "docker@latest"]
]
},
"import": [["docker@26.1.5"]],
"import": [["docker@26.1"]],
"readable": ["26.1"]
},
"mariadb": {
Expand Down
Loading
Loading