Skip to content

Commit 08ee859

Browse files
committed
new rollouts page
1 parent a8cb7fe commit 08ee859

File tree

2 files changed

+44
-12
lines changed

2 files changed

+44
-12
lines changed

src/content/docs/containers/faq.mdx

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -64,18 +64,7 @@ An Example:
6464

6565
## How do container updates and rollouts work?
6666

67-
When you run `wrangler deploy`, the Worker code is updated immediately and Container
68-
instances are updated using a rolling deploy strategy. The default rollout configuration is two steps,
69-
where the first step updates 10% of the instances, and the second step updates the remaining 90%.
70-
This can be configured in your Wrangler config file using the [`rollout_step_percentage`](/workers/wrangler/configuration#containers) property.
71-
72-
When deploying a change, you can also configure a [`rollout_active_grace_period`](/workers/wrangler/configuration#containers), which is the minimum
73-
number of seconds to wait before an active container instance becomes eligible for updating during a rollout.
74-
At that point, the container will be sent at `SIGTERM`, and still has 15 minutes to shut down gracefully.
75-
If the instance does not stop within 15 minutes, it is forcefully stopped with a `SIGKILL` signal.
76-
If you have cleanup that must occur before a Container instance is stopped, you should do it during this 15 minute period.
77-
78-
Once stopped, the instance is replaced with a new instance running the updated code. Requests may hang while the container is starting up again.
67+
See [rollout documentation](/containers/platform-details/rollouts/) for details.
7968

8069
## How does scaling work?
8170

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
---
2+
pcx_content_type: reference
3+
title: Rollouts
4+
sidebar:
5+
order: 2
6+
---
7+
8+
import { WranglerConfig } from "~/components";
9+
10+
## How rollouts work
11+
When you run `wrangler deploy`, the Worker code is updated immediately and Container
12+
instances are updated using a rolling deploy strategy. The default rollout configuration is two steps,
13+
where the first step updates 10% of the instances, and the second step updates the remaining 90%.
14+
This can be configured in your Wrangler config file using the [`rollout_step_percentage`](/workers/wrangler/configuration#containers) property.
15+
16+
When deploying a change, you can also configure a [`rollout_active_grace_period`](/workers/wrangler/configuration#containers), which is the minimum
17+
number of seconds to wait before an active container instance becomes eligible for updating during a rollout.
18+
At that point, the container will be sent at `SIGTERM`, and still has 15 minutes to shut down gracefully.
19+
If the instance does not stop within 15 minutes, it is forcefully stopped with a `SIGKILL` signal.
20+
If you have cleanup that must occur before a Container instance is stopped, you should do it during this 15 minute period.
21+
22+
Once stopped, the instance is replaced with a new instance running the updated code. Requests may hang while the container is starting up again.
23+
24+
Here is an example configuration that sets a 5 minute grace period and a two step rollout where the first step updates 10% of instances and the second step updates 100% of instances:
25+
<WranglerConfig>
26+
27+
```toml
28+
[[containers]]
29+
max_instances = 10
30+
class_name = "MyContainer"
31+
image = "./Dockerfile"
32+
rollout_active_grace_period = 300
33+
rollout_step_percentage = [10, 100]
34+
35+
[[durable_objects.bindings]]
36+
name = "MY_CONTAINER"
37+
class_name = "MyContainer"
38+
39+
[[migrations]]
40+
tag = "v1"
41+
new_sqlite_classes = ["MyContainer"]
42+
```
43+
</WranglerConfig>

0 commit comments

Comments
 (0)