You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
### How do sidecar containers handle internal communication?
10
+
11
+
Sidecar containers share the same network host as the main container, so the main container (and other sidecar containers) can reach any port on the sidecar with `localhost:<port>`. The example *startup.sh* uses `localhost:4318` to access port 4318 on the **otel-collector** sidecar.
12
+
13
+
In the **Edit container** dialog, the **Port** box isn't currently used by App Service. You can use it as part of the sidecar metadata, such as to indicate which port the sidecar is listening to.
14
+
15
+
### Can a sidecar container receive internet requests?
16
+
17
+
No. App Service routes internet requests only to the main container. For code-based Linux apps, the built-in Linux container is the main container, and any sidecar container ([sitecontainers](/azure/templates/microsoft.web/sites/sitecontainers)) should be added with `IsMain=false`. For custom containers, all but one of the [sitecontainers](/azure/templates/microsoft.web/sites/sitecontainers) should have `IsMain=false`.
18
+
19
+
For more information on configuring `IsMain`, see [Microsoft.Web sites/sitecontainers](/azure/templates/microsoft.web/sites/sitecontainers).
In Azure App Service, you can add up to nine sidecar containers for each Linux app. Sidecar containers let you deploy extra services and features to your Linux apps without making them tightly coupled to the main container (built-in or custom). For example, you can add monitoring, logging, configuration, and networking services as sidecar containers. An OpenTelemetry collector sidecar is one such monitoring example.
12
+
13
+
The sidecar containers run alongside the main application container in the same App Service plan.
Copy file name to clipboardExpand all lines: articles/app-service/tutorial-custom-container-sidecar.md
+29-17Lines changed: 29 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
title: 'Tutorial: Configure a sidecar for a custom container app'
3
3
description: Add sidecar containers to your custom container in Azure App Service. Add or update services to your application without changing your application container.
In this tutorial, you add an OpenTelemetry collector as a sidecar container to a Linux custom container app in Azure App Service. For bring-your-own-code Linux apps, see [Tutorial: Configure a sidecar container for a Linux app in Azure App Service](tutorial-sidecar.md).
14
14
15
-
In Azure App Service, you can add up to nine sidecar containers for each sidecar-enabled custom container app. Sidecar containers let you deploy extra services and features to your container application without making them tightly coupled to your main application container. For example, you can add monitoring, logging, configuration, and networking services as sidecar containers. An OpenTelemetry collector sidecar is one such monitoring example.
16
-
17
-
For more information about side container in App Service, see:
18
-
19
-
-[Introducing Sidecars for Azure App Service for Linux: Now Generally Available](https://azure.github.io/AppService/2024/11/08/Global-Availability-Sidecars.html)
20
-
-[Announcing the general availability of sidecar extensibility in Azure App Service](https://techcommunity.microsoft.com/blog/appsonazureblog/announcing-the-general-availability-of-sidecar-extensibility-in-azure-app-servic/4267985)
First you create the resources that the tutorial uses. They're used for this particular scenario and aren't required for sidecar containers in general.
@@ -154,22 +149,39 @@ When you no longer need the environment, you can delete the resource group, App
154
149
azd down
155
150
```
156
151
157
-
## How do sidecar containers handle internal communication?
152
+
## Frequently asked questions
153
+
154
+
-[What are the differences for sidecar-enabled custom containers?](#what-are-the-differences-for-sidecar-enabled-custom-containers)
155
+
-[How do sidecar containers handle internal communication?](includes/tutorial-sidecar/common-faqs.md#how-do-sidecar-containers-handle-internal-communication)
156
+
-[Can a sidecar container receive internet requests?](includes/tutorial-sidecar/common-faqs.md#can-a-sidecar-container-receive-internet-requests)
157
+
158
+
## What are the differences for sidecar-enabled custom containers?
159
+
160
+
You configure sidecar-enabled apps differently than apps that aren't sidecar-enabled.
158
161
159
-
Sidecar containers share the same network host as the main container, so the main container (and other sidecar containers) can reach any port on the sidecar with `localhost:<port>`. This is exactly how the Nginx container sends data to the sidecar (see the [OpenTelemetry module configuration for the sample Nginx image](https://github.com/Azure-Samples/app-service-sidecar-tutorial-prereqs/blob/main/images/nginx/opentelemetry_module.conf)).
162
+
### Not sidecar-enabled
160
163
161
-
In the **Edit container** dialog, the **Port** box isn't currently used by App Service. You can use it as part of the sidecar metadata, such as to indicate which port the sidecar is listening to.
164
+
- Container name and types are configured directly with `LinuxFxVersion=DOCKER|<image-details>` (see [az webapp config set --linux-fx-version](/cli/azure/webapp/config)).
165
+
- The main container is configured with app settings, such as:
166
+
-`DOCKER_REGISTRY_SERVER_URL`
167
+
-`DOCKER_REGISTRY_SERVER_USERNAME`
168
+
-`DOCKER_REGISTRY_SERVER_PASSWORD`
169
+
-`WEBSITES_PORT`
162
170
163
-
##Differences for sidecar-enabled apps
171
+
### Sidecar-enabled
164
172
165
-
You configure sidecar-enabled apps differently than apps that aren't sidecar-enabled. Specifically, you don't configure the main container and sidecars with app settings, but directly in the resource properties. These app settings don't apply for sidecar-enabled apps:
173
+
- A sidecar-enabled app is designated by `LinuxFxVersion=sitecontainers` (see [az webapp config set --linux-fx-version](/cli/azure/webapp/config)).
174
+
- The main container is configured with a [sitecontainers](/azure/templates/microsoft.web/sites/sitecontainers) resource. These settings don't apply for sidecar-enabled apps
175
+
-`DOCKER_REGISTRY_SERVER_URL`
176
+
-`DOCKER_REGISTRY_SERVER_USERNAME`
177
+
-`DOCKER_REGISTRY_SERVER_PASSWORD`
178
+
-`WEBSITES_PORT`
166
179
167
-
- Registry authentication settings: `DOCKER_REGISTRY_SERVER_URL`, `DOCKER_REGISTRY_SERVER_USERNAME` and `DOCKER_REGISTRY_SERVER_PASSWORD`.
Copy file name to clipboardExpand all lines: articles/app-service/tutorial-sidecar.md
+13-19Lines changed: 13 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
title: 'Tutorial: Configure a sidecar container'
3
3
description: Add sidecar containers to your Linux app in Azure App Service. Add or update services to your application without changing your application code.
4
4
ms.topic: tutorial
5
-
ms.date: 02/20/2025
5
+
ms.date: 05/08/2025
6
6
ms.author: cephalin
7
7
author: cephalin
8
8
keywords: azure app service, web app, linux, windows, docker, sidecar
In this tutorial, you add an OpenTelemetry collector as a sidecar container to a Linux (bring-your-own-code) app in Azure App Service. For custom containers, see [Tutorial: Configure a sidecar container for custom container in Azure App Service](tutorial-custom-container-sidecar.md).
14
14
15
-
In Azure App Service, you can add up to nine sidecar containers for each Linux app. Sidecar containers let you deploy extra services and features to your Linux apps without making them tightly coupled to the main (built-in) container. For example, you can add monitoring, logging, configuration, and networking services as sidecar containers. An OpenTelemetry collector sidecar is one such monitoring example.
16
-
17
-
For more information about side container in App Service, see:
18
-
19
-
-[Introducing Sidecars for Azure App Service for Linux: Now Generally Available](https://azure.github.io/AppService/2024/11/08/Global-Availability-Sidecars.html)
20
-
-[Announcing the general availability of sidecar extensibility in Azure App Service](https://techcommunity.microsoft.com/blog/appsonazureblog/announcing-the-general-availability-of-sidecar-extensibility-in-azure-app-servic/4267985)
First you create the resources that the tutorial uses. They're used for this particular scenario and aren't required for sidecar containers in general.
@@ -248,16 +243,13 @@ azd down
248
243
249
244
## Frequently asked questions
250
245
251
-
-[How do sidecar containers handle internal communication?](#how-do-sidecar-containers-handle-internal-communication)
246
+
-[How do sidecar containers handle internal communication?](includes/tutorial-sidecar/common-faqs.md#how-do-sidecar-containers-handle-internal-communication)
247
+
-[Can a sidecar container receive internet requests?](includes/tutorial-sidecar/common-faqs.md#can-a-sidecar-container-receive-internet-requests)
252
248
-[How do I instrument other language stacks?](#how-do-i-instrument-other-language-stacks)
253
249
254
-
#### How do sidecar containers handle internal communication?
255
-
256
-
Sidecar containers share the same network host as the main container, so the main container (and other sidecar containers) can reach any port on the sidecar with `localhost:<port>`. The example *startup.sh* uses `localhost:4318` to access port 4318 on the **otel-collector** sidecar.
257
-
258
-
In the **Edit container** dialog, the **Port** box isn't currently used by App Service. You can use it as part of the sidecar metadata, such as to indicate which port the sidecar is listening to.
0 commit comments