Skip to content

Commit 094a366

Browse files
Merge pull request #215915 from anthonychu/patch-13
[Container Apps] Add zero downtime section to app lifecycle
2 parents e56355c + 28a6f82 commit 094a366

File tree

4 files changed

+25
-6
lines changed

4 files changed

+25
-6
lines changed

articles/container-apps/application-lifecycle-management.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ services: container-apps
55
author: craigshoemaker
66
ms.service: container-apps
77
ms.topic: conceptual
8-
ms.date: 11/02/2021
8+
ms.date: 10/25/2022
99
ms.author: cshoe
1010
ms.custom: ignite-fall-2021, event-tier1-build-2022
1111
---
@@ -16,7 +16,7 @@ The Azure Container Apps application lifecycle revolves around [revisions](revis
1616

1717
When you deploy a container app, the first revision is automatically created. [More revisions are created](revisions.md) as [containers](containers.md) change, or any adjustments are made to the `template` section of the configuration.
1818

19-
A container app flows through three phases: deployment, update, and deactivation.
19+
A container app flows through four phases: deployment, update, deactivation, and shutdown.
2020

2121
## Deployment
2222

@@ -26,10 +26,19 @@ As a container app is deployed, the first revision is automatically created.
2626

2727
## Update
2828

29-
As a container app is updated with a [revision scope-change](revisions.md#revision-scope-changes), a new revision is created. You can choose whether to [automatically deactivate old revisions, or allow them to remain available](revisions.md).
29+
As a container app is updated with a [revision scope-change](revisions.md#revision-scope-changes), a new revision is created. You can [choose](revisions.md#revision-modes) whether to automatically deactivate old revisions (single revision mode), or allow them to remain available (multiple revision mode).
3030

3131
:::image type="content" source="media/application-lifecycle-management/azure-container-apps-lifecycle-update.png" alt-text="Azure Container Apps: Update phase":::
3232

33+
### Zero downtime deployment
34+
35+
In single revision mode, Container Apps automatically ensures your app does not experience downtime when creating new a revision. The existing active revision is not deactivated until the new revision is ready. If ingress is enabled, the existing revision will continue to receive 100% of the traffic until the new revision is ready.
36+
37+
> [!NOTE]
38+
> A new revision is considered ready when one of its replicas starts and becomes ready. A replica is ready when all of its containers start and pass their [startup and readiness probes](./health-probes.md).
39+
40+
In multiple revision mode, you control when revisions are activated or deactivated and which revisions receive ingress traffic. If a [traffic splitting rule](./revisions-manage.md#traffic-splitting) is configured with `latestRevision` set to `true`, traffic does not switch to the latest revision until it is ready.
41+
3342
## Deactivate
3443

3544
Once a revision is no longer needed, you can deactivate a revision with the option to reactivate later. During deactivation, containers in the revision are [shut down](#shutdown).

articles/container-apps/health-probes.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ author: craigshoemaker
66
ms.service: container-apps
77
ms.custom: event-tier1-build-2022, ignite-2022
88
ms.topic: conceptual
9-
ms.date: 03/30/2022
9+
ms.date: 10/28/2022
1010
ms.author: cshoe
1111
---
1212

@@ -158,7 +158,15 @@ The optional `failureThreshold` setting defines the number of attempts Container
158158

159159
## Default configuration
160160

161-
Container Apps offers default probe settings if no probes are defined. If your app takes an extended amount of time to start, which is very common in Java, you often need to customize the probes so your container won't crash.
161+
If ingress is enabled, the following default probes are automatically added to the main app container if none is defined for each type.
162+
163+
| Probe type | Default values |
164+
| -- | -- |
165+
| Startup | Protocol: TCP<br>Port: ingress target port<br>Timeout: 1 second<br>Period: 1 second<br>Initial delay: 1 second<br>Success threshold: 1<br>Failure threshold: `timeoutSeconds` |
166+
| Readiness | Protocol: TCP<br>Port: ingress target port<br>Timeout: 5 seconds<br>Period: 5 seconds<br>Initial delay: 3 seconds<br>Success threshold: 1<br>Failure threshold: `timeoutSeconds / 5` |
167+
| Liveness | Protocol: TCP<br>Port: ingress target port |
168+
169+
If your app takes an extended amount of time to start, which is very common in Java, you often need to customize the probes so your container won't crash.
162170

163171
The following example demonstrates how to configure the liveness and readiness probes in order to extend the startup times.
164172

articles/container-apps/revisions-manage.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,8 @@ az containerapp revision set-mode `
297297

298298
Applied by assigning percentage values, you can decide how to balance traffic among different revisions. Traffic splitting rules are assigned by setting weights to different revisions.
299299

300+
To create a traffic rule that always routes traffic to the latest revision, set its `latestRevision` property to `true` and don't set `revisionName`.
301+
300302
The following example shows how to split traffic between three revisions.
301303

302304
```json

articles/container-apps/revisions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ The revision mode controls whether only a single revision or multiple revisions
105105

106106
### Single revision mode
107107

108-
By default, a container app is in *single revision mode*. In this mode, only one revision is active at a time. When a new revision is created, the latest revision replaces the active revision.
108+
By default, a container app is in *single revision mode*. In this mode, when a new revision is created, the latest revision replaces the active revision. For more information, see [Zero downtime deployment](./application-lifecycle-management.md#zero-downtime-deployment).
109109

110110
### Multiple revision mode
111111

0 commit comments

Comments
 (0)