Skip to content

Commit 178ead7

Browse files
authored
Merge pull request #209 from DefangLabs/eric-update-scaling-doc
2 parents 6aa58d7 + 7428d32 commit 178ead7

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

docs/concepts/scaling.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,11 @@ Instead of manually adding more instances when traffic increases, an auto-scalin
3737

3838
### Example
3939

40-
With Defang a user, with a Pro and higher plan, can enable service level autoscaling by adding a _**x-defang-autoscaling**_ extension to the service which is to be autoscaled.
40+
With Defang, users on the Pro plan or higher can enable service-level autoscaling in three steps:
41+
42+
1. Add the _**x-defang-autoscaling : true**_ extension to the service you want to autoscale.
43+
2. Remove any _**replicas**_ field in the _**deploy**_ mapping (if present).
44+
3. Deploy using staging or production [mode](/docs/concepts/deployments#deployment-modes). (e.g. ```defang compose up --provider=aws --mode=production```)
4145

4246
```yaml
4347
services:

docs/tutorials/scaling-your-services.mdx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ Autoscaling allows your services to automatically adjust the number of replicas
6666

6767
### Enabling Autoscaling
6868

69-
To enable autoscaling for a service, add the `x-defang-autoscaling: true` extension under the service definition in your `compose.yaml` file.
69+
To enable autoscaling for a service, add the `x-defang-autoscaling: true` extension under the service definition in your `compose.yaml` file and remove the _**replicas**_ field in your
70+
_**deploy**_ mapping, if present. Autoscaling is available in staging and production [deployments modes](/docs/concepts/deployments#deployment_modes) only.
7071

7172
Example:
7273

@@ -85,9 +86,9 @@ Requirements
8586

8687
- BYOC, your own cloud platform account.
8788
- You must be on the Pro or higher plan to use autoscaling. ([Defang plans](https://defang.io/#pricing))
89+
- _**replicas**_ must **NOT** be defined
8890
- Only staging and production deployment modes supported. ([Deployment modes](/docs/concepts/deployment-modes))
8991
- The service must be stateless or able to run in multiple instances. ([Scaling](/docs/concepts/scaling))
90-
- Only CPU metrics are used for scaling decisions.
9192

9293
Best Practices
9394

0 commit comments

Comments
 (0)