Microservice APIs powered by Dapr
Azure Container Apps provides APIs powered by Distributed Application Runtime (Dapr) that help you write and implement simple, portable, resilient, and secured microservices. Dapr works together with Azure Container Apps as an abstraction layer to provide a low-maintenance and scalable platform. Azure Container Apps offers a selection of fully managed Dapr APIs, components, and features, catered specifically to microservice scenarios. Simply enable and configure Dapr as usual in your container app environment.
How the microservices APIs work with your container app
Configure microservices APIs for your container apps environment with a Dapr-enabled container app, a Dapr component configured for your solution, and a Dapr sidecar invoking communication between them. The following diagram demonstrates these core concepts, using the pub/sub API as an example.
Label | Dapr settings | Description |
---|---|---|
1 | Container Apps with Dapr enabled | Dapr is enabled at the container app level by configuring a set of Dapr arguments. These values apply to all revisions of a given container app when running in multiple revisions mode. |
2 | Dapr | The fully managed Dapr APIs are exposed to each container app through a Dapr sidecar. The Dapr APIs can be invoked from your container app via HTTP or gRPC. The Dapr sidecar runs on HTTP port 3500 and gRPC port 50001. |
3 | Dapr component configuration | Dapr uses a modular design where functionality is delivered as a component. Dapr components can be shared across multiple container apps. The Dapr app identifiers provided in the scopes array dictate which dapr-enabled container apps load a given component at runtime. |
Supported Dapr APIs, components, and tooling
Managed APIs
Azure Container Apps offers managed generally available Dapr APIs (building block APIs and operational APIs). These APIs are fully managed and supported for use in production environments.
To learn more about using alpha Dapr APIs and features, see the Dapr FAQ.
Building block APIs
Building block API | Status | Description |
---|---|---|
Service-to-service invocation | GA | Discover services and perform reliable, direct service-to-service calls with automatic mTLS authentication and encryption. See known limitations for Dapr service invocation in Azure Container Apps. |
State management | GA | Provides state management capabilities for transactions and CRUD operations. |
Pub/sub | GA | Allows publisher and subscriber container apps to intercommunicate via an intermediary message broker. You can also create declarative subscriptions to a topic using an external component JSON file. Learn more about the declarative pub/sub API. |
Bindings | GA | Trigger your applications based on events |
Actors | GA | Dapr actors are message-driven, single-threaded, units of work designed to quickly scale. For example, in burst-heavy workload situations. |
Secrets | GA | Access secrets from your application code or reference secure values in your Dapr components. |
Configuration | GA | Retrieve and subscribe to application configuration items for supported configuration stores. |
Operational APIs
Operational API | Status | Description |
---|---|---|
Health | GA | Health check probes that monitor readiness or liveness of Dapr and initialization readiness of SDKs. The health API is only available for HTTP. |
Metadata | GA | Returns information about the sidecar, allowing runtime discoverability. |
Compatible SDKs
Dapr's latest client SDK packages are compatible with Azure Container Apps. You can use any of the supported, GA Dapr APIs with the following Dapr client SDK versions:
Language | SDK version |
---|---|
Java | 1.12.0 |
Go | 1.11.0 |
Python | 1.14.0 |
.NET | 1.14.0 |
JavaScript | 3.3.1 |
Rust | 0.15.1 |
Note
Currently, the Dapr server extensions, actor, and workflow SDK packages are not compatible with Azure Container Apps. Learn more about all of the Dapr SDK packages.
Dapr components
Tier 1 versus Tier 2 components
A subset of Dapr components is supported. Within that subset, Dapr components are broken into two support categories: Tier 1 or Tier 2.
- Tier 1 components: Stable components that receive immediate investigation in critical (security or serious regression) scenarios. Otherwise, Microsoft collaborates with open source to address in a hotfix or the next regular release.
- Tier 2 components: Components that are investigated on a lesser priority, as they're not in stable state or are with a third party provider.
Tier 1 components
API | Component | Type |
---|---|---|
State management | Azure Cosmos DB Azure Blob Storage v1 Azure Table Storage Microsoft SQL Server |
state.azure.cosmosdb state.azure.blobstorage state.azure.tablestorage state.sqlserver |
Publish & subscribe | Azure Service Bus Queues Azure Service Bus Topics Azure Event Hubs |
pubsub.azure.servicebus.queues pubsub.azure.servicebus.topics pubsub.azure.eventhubs |
Binding | Azure Storage Queues Azure Service Bus Queues Azure Blob Storage Azure Event Hubs |
bindings.azure.storagequeues bindings.azure.servicebusqueues bindings.azure.blobstorage bindings.azure.eventhubs |
Secrets management | Azure Key Vault | secretstores.azure.keyvault |
Tier 2 components
API | Component | Type |
---|---|---|
State management | PostgreSQL MySQL & MariaDB Redis |
state.postgresql state.mysql state.redis |
Publish & subscribe | Apache Kafka Redis Streams |
pubsub.kafka pubsub.redis |
Binding | Azure Event Grid Azure Cosmos DB Apache Kafka PostgreSQL Redis Cron |
bindings.azure.eventgrid bindings.azure.cosmosdb bindings.kafka bindings.postgresql bindings.redis bindings.cron |
Configuration | PostgreSQL Redis |
configuration.postgresql configuration.redis |
Learn more about how to use the supported Dapr components in Azure Container Apps.
Tooling
Azure Container Apps ensures compatibility with Dapr open source tooling, such as SDKs and the CLI.
Limitations
- Dapr Configuration spec: Any capabilities that require use of the Dapr configuration spec.
- Any Dapr sidecar annotations not listed in the Dapr enablement guide
- APIs and components support: Only the Dapr APIs and components listed as GA, Tier 1, or Tier 2 in this article are supported in Azure Container Apps.
- Actor reminders: Require a minReplicas of 1+ to ensure reminders is always active and fires correctly.
- Jobs: Dapr isn't supported for jobs.
Next steps
- Deploy Dapr using:
- Enable Dapr in an existing container app.