Skip to content

Commit 1a2e3cc

Browse files
Merge pull request #219371 from anaharris-ms/rel-containers
Reliability Documentation: Containers
2 parents 5e0982c + 3956b60 commit 1a2e3cc

File tree

2 files changed

+228
-1
lines changed

2 files changed

+228
-1
lines changed

articles/reliability/TOC.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@
158158
- name: Azure Cognitive Search
159159
href: ../search/search-performance-optimization.md?toc=/azure/reliability/toc.json&bc=/azure/reliability/breadcrumb/toc.json
160160
- name: Azure Container Instances
161-
href: ../container-instances/availability-zones.md?toc=/azure/reliability/toc.json&bc=/azure/reliability/breadcrumb/toc.json
161+
href: reliability-containers.md
162162
- name: Azure Container Registry
163163
href: ../container-registry/zone-redundancy.md?toc=/azure/reliability/toc.json&bc=/azure/reliability/breadcrumb/toc.json
164164
- name: Azure Cosmos DB
Lines changed: 227 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,227 @@
1+
---
2+
title: Reliability in Azure Container Instances
3+
description: Find out about reliability in Azure Container Instances
4+
author: anaharris-ms
5+
ms.author: anaharris
6+
ms.topic: overview
7+
ms.custom: subject-reliability
8+
ms.prod: non-product-specific
9+
ms.date: 11/29/2022
10+
---
11+
12+
<!--#Customer intent: I want to understand reliability support in Azure Container Instances so that I can respond to and/or avoid failures in order to minimize downtime and data loss. -->
13+
14+
15+
# What is reliability in Azure Container Instances?
16+
17+
18+
> [!IMPORTANT]
19+
> This feature is currently in preview. Previews are made available to you on the condition that you agree to the supplemental terms of use.
20+
21+
This article describes reliability support in Azure Container Instances (ACI) and covers both intra-regional resiliency with [availability zones](#availability-zone-support) and information on Disaster Recovery. For a more detailed overview of reliability in Azure, see [Azure reliability](/azure/architecture/framework/resiliency/overview).
22+
23+
## Availability zone support
24+
25+
Azure availability zones are at least three physically separate groups of datacenters within each Azure region. Datacenters within each zone are equipped with independent power, cooling, and networking infrastructure. In the case of a local zone failure, availability zones are designed so that if one zone is affected, regional services, capacity, and high availability are supported by the remaining two zones. Failures can range from software and hardware failures to events such as earthquakes, floods, and fires. Tolerance to failures is achieved with redundancy and logical isolation of Azure services. For more detailed information on availability zones in Azure, see [Availability zone service and regional support](availability-zones-service-support.md).
26+
27+
There are three types of Azure services that support availability zones: zonal, zone-redundant, and always-available services. You can learn more about these types of services and how they promote resiliency in the [Azure services with availability zone support](availability-zones-service-support.md#azure-services-with-availability-zone-support).
28+
29+
Azure Container Instances supports *zonal* container group deployments, meaning the instance is pinned to a specific, self-selected availability zone. The availability zone is specified at the container group level. Containers within a container group can't have unique availability zones. To change your container group's availability zone, you must delete the container group and create another container group with the new availability zone.
30+
31+
32+
### Prerequisites
33+
34+
> [!IMPORTANT]
35+
> This feature is currently not available for Azure portal.
36+
37+
- Zonal container group deployments are supported in most regions where ACI is available for Linux and Windows Server 2019 container groups. For details, see [Regions and resource availability][container-regions].
38+
- Availability zone support is only available on ACI API version 09-01-2021 or later.
39+
- For Azure CLI, version 2.30.0 or later must be installed.
40+
- For PowerShell, version 2.1.1-preview or later must be installed.
41+
- For Java SDK, version 2.9.0 or later must be installed.
42+
43+
44+
The following container groups *do not* support availability zones at this time:
45+
46+
- Container groups with GPU resources
47+
- Virtual Network injected container groups
48+
- Windows Server 2016 container groups
49+
50+
### Availability zone redeployment and migration
51+
52+
To change your container group's availability zone, you must delete the container group and create another container group with the new availability zone.
53+
54+
55+
### Create a resource with availability zone enabled
56+
57+
58+
#### Deploy a container group using an Azure Resource Manager (ARM) template
59+
60+
1. Copy-paste the following JSON into a new file named `azuredeploy.json`. This example template deploys a container group with a single container into availability zone 1 in East US.
61+
62+
```json
63+
{
64+
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
65+
"contentVersion": "1.0.0.0",
66+
"metadata": {
67+
"_generator": {
68+
"name": "bicep",
69+
"version": "0.4.1.14562",
70+
"templateHash": "12367894147709986470"
71+
}
72+
},
73+
"parameters": {
74+
"name": {
75+
"type": "string",
76+
"defaultValue": "acilinuxpublicipcontainergroup",
77+
"metadata": {
78+
"description": "Name for the container group"
79+
}
80+
},
81+
"image": {
82+
"type": "string",
83+
"defaultValue": "mcr.microsoft.com/azuredocs/aci-helloworld",
84+
"metadata": {
85+
"description": "Container image to deploy. Should be of the form repoName/imagename:tag for images stored in public Docker Hub, or a fully qualified URI for other registries. Images from private registries require additional registry credentials."
86+
}
87+
},
88+
"port": {
89+
"type": "int",
90+
"defaultValue": 80,
91+
"metadata": {
92+
"description": "Port to open on the container and the public IP address."
93+
}
94+
},
95+
"cpuCores": {
96+
"type": "int",
97+
"defaultValue": 1,
98+
"metadata": {
99+
"description": "The number of CPU cores to allocate to the container."
100+
}
101+
},
102+
"memoryInGb": {
103+
"type": "int",
104+
"defaultValue": 2,
105+
"metadata": {
106+
"description": "The amount of memory to allocate to the container in gigabytes."
107+
}
108+
},
109+
"restartPolicy": {
110+
"type": "string",
111+
"defaultValue": "Always",
112+
"allowedValues": [
113+
"Always",
114+
"Never",
115+
"OnFailure"
116+
],
117+
"metadata": {
118+
"description": "The behavior of Azure runtime if container has stopped."
119+
}
120+
},
121+
"location": {
122+
"type": "string",
123+
"defaultValue": "eastus",
124+
"metadata": {
125+
"description": "Location for all resources."
126+
}
127+
}
128+
},
129+
"functions": [],
130+
"resources": [
131+
{
132+
"type": "Microsoft.ContainerInstance/containerGroups",
133+
"apiVersion": "2021-09-01",
134+
"zones": [
135+
"1"
136+
],
137+
"name": "[parameters('name')]",
138+
"location": "[parameters('location')]",
139+
"properties": {
140+
"containers": [
141+
{
142+
"name": "[parameters('name')]",
143+
"properties": {
144+
"image": "[parameters('image')]",
145+
"ports": [
146+
{
147+
"port": "[parameters('port')]",
148+
"protocol": "TCP"
149+
}
150+
],
151+
"resources": {
152+
"requests": {
153+
"cpu": "[parameters('cpuCores')]",
154+
"memoryInGB": "[parameters('memoryInGb')]"
155+
}
156+
}
157+
}
158+
}
159+
],
160+
"osType": "Linux",
161+
"restartPolicy": "[parameters('restartPolicy')]",
162+
"ipAddress": {
163+
"type": "Public",
164+
"ports": [
165+
{
166+
"port": "[parameters('port')]",
167+
"protocol": "TCP"
168+
}
169+
]
170+
}
171+
}
172+
}
173+
],
174+
"outputs": {
175+
"containerIPv4Address": {
176+
"type": "string",
177+
"value": "[reference(resourceId('Microsoft.ContainerInstance/containerGroups', parameters('name'))).ipAddress.ip]"
178+
}
179+
}
180+
}
181+
```
182+
183+
2. Create a resource group with the [az group create][availability-zones-group-create] command:
184+
185+
```azurecli
186+
az group create --name myResourceGroup --location eastus
187+
```
188+
189+
3. Deploy the template with the [az deployment group create][az-deployment-group-create] command:
190+
191+
```azurecli
192+
az deployment group create \
193+
--resource-group myResourceGroup \
194+
--template-file azuredeploy.json
195+
```
196+
197+
## Get container group details
198+
199+
To verify the container group deployed successfully into an availability zone, view the container group details with the [az container show][az-container-show] command:
200+
201+
```azurecli
202+
az containershow --name acilinuxcontainergroup --resource-group myResourceGroup
203+
```
204+
205+
### Zonal failover support
206+
207+
A container group of container instances is assigned to a single availability zone. As a result, that group of container instances won't be impacted by an outage that occurs in any other availability zone of the same region
208+
209+
If, however, an outage occurs in the availability zone of the container group, you can expect downtime for all the container instances within that group.
210+
211+
To avoid container instance downtime, we recommend that you create a minimum of two container groups across two different availability zones in a given region. This ensures that your container instance resources are up and running whenever any single zone in that region experiences outage.
212+
213+
214+
## Disaster recovery
215+
216+
When an entire Azure region or datacenter experiences downtime, your mission-critical code needs to continue processing in a different region. Azure Container Instances deployed with zonal configuration run in a specific zone within a specific region. There's no built-in redundancy available. To avoid loss of execution during region wide outages, you can redundantly deploy the container instances in other regions.
217+
218+
## Next steps
219+
220+
> [!div class="nextstepaction"]
221+
> [Azure Cache for Redis Premium service tiers](../container-instances/availability-zones.md#next-steps)
222+
223+
> [!div class="nextstepaction"]
224+
> [Reliability in Azure](/azure/reliability/overview.md)
225+
226+
227+

0 commit comments

Comments
 (0)