Azure
Design notes for running Celerity applications on Azure
Design notes
This target environment is part of the vision and is not available yet. These notes come from early research into how Celerity resource types are likely to work on it. They are kept as a reference for when it is implemented, and will change when it is.
Azure is envisioned as two deploy targets: azure, which runs the Celerity runtime on Azure Container Apps or AKS, and azure-serverless, which deploys handlers to Azure Functions. Compute resource types describe each separately. Infrastructure resource types work the same way with both deploy targets.
celerity/api
Container Apps and AKS
On Azure Container Apps and AKS, APIs are deployed as a containerised version of the Celerity runtime. Authentication, authorisation and CORS configuration defined for the API is taken care of by the runtime.
APIs can be deployed to Azure Container Apps or Azure Kubernetes Service (AKS). You can use compute configuration shared between compute resource types in the app deploy configuration file to fine-tune the compute configuration for your application.
Container Apps
Container Apps is a relatively simple environment to deploy applications to, the API is deployed as a containerised application that is fronted by either external HTTPS ingress or internal ingress.
Autoscaling is determined based on the number of concurrent HTTP requests for public APIs, for private APIs and hybrid applications (e.g. API and message processor) KEDA-supported CPU and memory scaling triggers are used. By default, in production app environments, the scale definition is set to scale from 2 to 5 replicas per revision. For development app environments, the default scale definition is set to scale from 1 to 3 replicas per revision. The minimum and maximum number of replicas can be overridden in the deploy configuration.
When domain configuration is provided and the API is configured to be public-facing, a managed TLS certificate is provisioned and attached to the Container App's HTTP ingress configuration. You will need to verify the domain ownership before the certificate can be used.
See the celerity/api VPC annotations for the annotations referenced below.
Container Apps will not be associated with a private network by default, a VNet is automatically generated for you and generated VNets are publicly accessible over the internet. Read about networking for Container Apps. When you define a VPC and link it to the API, a custom VNet will be provisioned and the API will be deployed to either a private or public subnet based on the celerity.api.vpc.subnetType annotation, defaulting to a public subnet if not specified. When the celerity.api.vpc.lbSubnetType is set to public, a public HTTPS ingress is provisioned for the API; when set to private, an internal HTTP ingress is provisioned for the API. Azure's built-in zone redundancy is used to ensure high availability of the API.
Memory and CPU resources allocated to the API can be defined in the deploy configuration, when not defined, memory and CPU will be derived from the handlers configured for the API. If memory and CPU is not defined in the deploy configuration and can not be derived from the handlers, some defaults will be set. For production app environments, the Container App service will be allocated a limit of 2GB of memory and 1 vCPU per instance in the consumption plan, see allocation requirements. For development app environments, the Container App service will be allocated a limit of 1GB of memory and 0.5 vCPUs per instance in the consumption plan.
The OpenTelemetry Data Agent is used to collect traces and metrics for the application. Traces will only be collected if tracing is enabled for the API.
AKS
When an API is first deployed to AKS, a new cluster is created for the API unless you specify an existing cluster to use in the deploy configuration.
Using existing clusters
When using an existing cluster, it must be configured in a way that is compatible with the VPC annotations configured for the API as well as the target compute type.
Cost of running on AKS
Running a Celerity application on AKS will often not be the most cost-effective option for APIs with low traffic or applications that are not expected to use a lot of resources. The default configuration uses instances that meet the minimum requirements to run Kubernetes in AKS that will cost hundreds of US dollars a month to run. If you are looking for a cost-effective solution for low-traffic/low-load applications on Azure, consider using Azure Container Apps instead.
The cluster is created across 2 availability zones for better availability guarantees. Best effort zone balancing is used with Azure VM Scale Sets. 2 separate node pools will be configured for the cluster, 1 for the Kubernetes system components and 1 for your application. When using an existing cluster, a new node pool will be created specifically for this application.
The cluster is configured with an autoscaler for each node pool. For production app environments, by default, the autoscaler for the application node pool will be configured with a minimum of 3 nodes and a maximum of 6 nodes distributed across availability zones as per Azure's zone balancing. For development app environments, the autoscaler for the application node pool will be configured with a minimum of 1 node and a maximum of 3 nodes by default.
The autoscaler for the system node pool will be configured with a minimum of 2 nodes and a maximum of 3 nodes for production app environments. For development app environments, the autoscaler for the system node pool will be configured with a minimum of 1 node and a maximum of 2 nodes by default.
For both production and development app environments, the default node size for the system node pool is Standard_D4d_v5 with 4 vCPUs and 16GB of memory. This size has been chosen because of the minimum requirements for system Node Pools.
For the application node pool, the default node size differs based on the app environment. For production app environments, the default node size is Standard_D4ls_v6 with 4 vCPUs and 8GB of memory. For development app environments, the default node size is Standard_D2ls_v6 with 2 vCPUs and 4GB of memory.
If the CPU or memory requirements of the API defined in the app blueprint cause the default node size to not be able to comfortably run 2 instances of the API, a larger node size will be selected.
Min and max node count along with the node size for both system and application node pools can be overridden in the deploy configuration.
The Kubernetes Horizontal Pod Autoscaler is used to scale the number of pods running the API based on CPU utilisation and average memory utilisation. In development app environments, the minimum number of pods is set to 1 and the maximum number of pods is set to 6 by default. In production app environments, the minimum number of pods is set to 2 and the maximum number of pods is set to 12 by default. The minimum and maximum number of pods can be overridden in the deploy configuration.
When domain configuration is provided and the load balancer that powers the Ingress service is public-facing, a TLS certificate is generated with Let's Encrypt via cert-manager to provision certificates for domains associated with Ingress resources in Kubernetes. The certificate is used by the Ingress object to terminate TLS traffic. You will need to verify the domain ownership before the certificate can be used.
When it comes to networking, the API will be deployed with the overlay network model in a public network as per the default AKS access mode. Read about private and public clusters for AKS.
When you define a VPC and link it to the API, the API will be deployed as a private cluster using the VNET integration feature of AKS where the control plane will not be made available through a public endpoint. The celerity.api.vpc.subnetType annotation has no effect for AKS deployments as the networking model for Azure with it's managed Kubernetes offering is different from other cloud providers and all services running on a cluster are private by default, exposed to the internet through a load balancer or ingress controller. When celerity.api.vpc.lbSubnetType is set to public, an Ingress service is provisioned using the nginx ingress controller that uses an external Azure Load Balancer under the hood. When celerity.api.vpc.lbSubnetType is set to private, the nginx Ingress controller is configured to use an internal Azure Load Balancer, read more about the private ingress controller.
Memory and CPU resources allocated to the API pod can be defined in the deploy configuration, if not specified, the API will derive memory and CPU from handlers configured for the API. If memory and CPU is not defined in the deploy configuration and can not be derived from the handlers, some defaults will be set. For production app environments, the pod that runs the API will be allocated a limit of 1,792MB of memory and 0.8 vCPUs. For development app environments, the pod that runs the API will be allocated a limit of 870MB of memory and 0.4 vCPUs.
The OpenTelemetry Operator is used to configure a sidecar collector container for the API to collect traces and metrics. Traces will only be collected if tracing is enabled for the API.
Azure Functions
On Azure Functions, REST/HTTP APIs are deployed as Azure API Management APIs with Azure Functions for the handlers.
JWT authentication for API Management Gateways is used for JWT auth guards. The supported asymmetric signing algorithms are PS256, RS256, RS612 and ES256. The Celerity API implementation deployed to Azure API Management only supports the openid configuration approach that uses a JWKS that provides the public key parts for a set of asymmetric keys.
Custom authorisers are not supported by Azure API Management; to get around this, Celerity will bundle the custom authoriser handler code with each protected handler and the handlers SDK that is used to build a Celerity application will take care of calling the custom authoriser before the actual handler is called.
When tracing is enabled, the trace policy is used for the API Management Gateway, these traces will go to Application Insights. You can export logs, traces and metrics to other tools like Grafana with plugins that use Azure Monitor as a data source.
When it comes to the Azure Functions that power the endpoints, traces and metrics go to Application Insights by default, from which you can export logs, traces and metrics to other tools like Grafana with plugins that use Azure Monitor as a data source.
OpenTelemetry for Azure Functions is also supported for some languages, you can use the azure.serverless.functions.otel deploy configuration option to enable OpenTelemetry for Azure Functions.
About WebSockets
Azure API Management does not support WebSocket APIs natively, WebSocket APIs can be used as the backend server but do not get the benefits of the API Management features such as authentication.
Azure API Management supports WebSocket APIs where the upstream backend is itself a WebSocket server. In this situation, you would have a Celerity runtime instance as your backend WebSocket server. Celerity does not manage this for you. You would need to setup and manage your own Azure API Management instance and configure the Celerity WebSocket API as the backend server.
celerity/handler
Container Apps and AKS
On Container Apps and AKS, handlers are loaded into the Celerity runtime in a single process. Depending on links and configuration, the handler will be wired up to the appropriate HTTP route, WebSocket route, event source, stream or scheduled trigger. Azure Service Bus queues will be wired up directly to the application in the runtime that will forward messages to the handler, other event sources will have some glue components such as a Service Bus queue that the application will poll for events. The Celerity runtime works in tandem with the Bluelink deploy engine to make sure that handlers are wired up correctly to the event sources even when there is no direct connection between the application running in the Celerity runtime and the event source.
Azure Functions
On Azure Functions, handlers are deployed as Azure Functions.
Depending on links and configuration, the handler will be wired up to the appropriate HTTP route, event source, stream or scheduled trigger.
HTTP handlers will be wired up to Azure API Management, event sources such as Azure Event Hubs, Azure Blob Storage and Azure Service Bus will be wired up to the Azure Function directly. For scheduled triggers, a timer trigger is configured for the function. For queues, Azure Service Bus queues will be configured as triggers for the Azure Function. Workflows can not be deployed to the Azure Serverless target environment, so handlers used as steps in a workflow are deployed with the azure target, loaded into the container of the Celerity workflow runtime (read more).
Warning
Azure Functions do not support WebSocket APIs, meaning handlers linked from WebSocket APIs can not be deployed to Azure Functions.
The maximum timeout for an HTTP-triggered Azure Function is 230 seconds; no maximum execution time-out is defined for functions that are triggered by other means. For handlers that need to run longer, Container Apps or AKS would be the alternative.
Runtime mapping
Celerity runtime identifiers would map to Azure as follows.
| Environment | Example for python3.13.x | Example for os-only.debian13 |
|---|---|---|
| Container Apps and AKS | Celerity runtime container image | Celerity runtime container image |
| Azure Functions | Python 3.13 worker or custom handler | Custom handler |
Azure Functions and OS-only runtimes
Azure Functions do not support OS-only runtimes in the same way as the Celerity runtime and AWS Lambda. Azure Functions do support custom handlers that are compiled light-weight HTTP servers that run in the Azure Functions runtime environment. Celerity would map OS-only runtime identifiers (os-only.*) to custom handlers in Azure Functions.
celerity/consumer
Container Apps and AKS
On Container Apps and AKS, consumer applications are deployed as a containerised version of the Celerity runtime.
Consumer applications can be deployed to Azure Container Apps or Azure Kubernetes Service (AKS) using deploy configuration for the Azure target environment.
Container Apps
Container Apps is a relatively simple environment to deploy applications to, the consumer application is deployed as an event-driven job.
When the sourceId is a Celerity topic, an Azure Service Bus Queue is created to subscribe to the topic to implement a reliable and scalable fan-out approach. The Azure Container Apps job environment is then configured to listen to the Service Bus Queue for messages.
For other event sources, an integration is set up to receive events from the source data store, bucket or queue and forward them to the consumer application via a Service Bus Queue.
Autoscaling is determined based on the number of messages received in the queue. By default, the scaling rules are set to scale the number of instances with a minimum of 0 executions and a maximum of 10 executions in production app environments. For development app environments, the default configuration is set to scale from 0 to 5 executions. Deploy configuration can be used to override this behaviour.
Container Apps will not be associated with a private network by default, a VNet is automatically generated for you and generated VNets are publicly accessible over the internet. Read about networking for Container Apps. When you define a VPC and link it to the consumer application, a custom VNet will be provisioned and the consumer application will be deployed to either a private or public subnet based on the celerity.consumer.vpc.subnetType annotation, defaulting to a public subnet if not specified. As consumer applications are triggered by the the Container Apps Jobs service, availability guarantees for a consumer application relies on the Azure Container Apps platform.
Memory and CPU resources allocated to the application can be defined in the deploy configuration, when not defined, memory and CPU will be derived from the handlers configured for the application. If memory and CPU is not defined in the deploy configuration and can not be derived from the handlers, some defaults will be set. For production app environments, the Container App job will be allocated a limit of 2GB of memory and 1 vCPU per instance in the consumption plan, see allocation requirements. For development app environments, the Container App job will be allocated a limit of 1GB of memory and 0.5 vCPUs per instance in the consumption plan.
The OpenTelemetry Data Agent is used to collect traces and metrics for the application. Traces will only be collected if tracing is enabled for the handlers that process messages.
Warning
When deploying to the Azure environment with Container Apps, consumer applications can not be combined into a single application with an API. To utilise the Azure Container Apps jobs environment to do the heavy lifting when it comes to scaling and launching jobs, consumer applications must be background jobs that are not accessible from the public internet and only run when triggered by a message in the queue.
AKS
In the AKS environment, the Celerity runtime will poll for messages and trigger handlers in response to messages from a queue.
When a consumer application is first deployed to AKS, a new cluster is created for the application unless you specify an existing cluster to use in the deploy configuration.
Using existing clusters
When using an existing cluster, it must be configured in a way that is compatible with the VPC annotations configured for the application as well as the target compute type.
Cost of running on AKS
Running a Celerity application on AKS will often not be the most cost-effective option for consumer applications that are not expected to use a lot of resources. The default configuration uses instances that meet the minimum requirements to run Kubernetes in AKS that will cost hundreds of US dollars a month to run. If you are looking for a cost-effective solution for low-load applications on Azure, consider using Azure Container Apps instead.
When the sourceId is a Celerity topic, an Azure Service Bus Queue is created to subscribe to the topic to implement a reliable and scalable fan-out approach. The Celerity runtime is configured to listen for messages from the Service Bus Queue for messages.
For other event sources, an integration is set up to receive events from the source data store, bucket or queue and forward them to the consumer application via a Service Bus Queue. The Celerity runtime will then listen for messages from the Service Bus Queue.
The cluster is created across 2 availability zones for better availability guarantees. Best effort zone balancing is used with Azure VM Scale Sets. 2 separate node pools will be configured for the cluster, 1 for the Kubernetes system components and 1 for your application. When using an existing cluster, a new node pool will be created specifically for this application.
The cluster is configured with an autoscaler for each node pool. For production app environments, by default, the autoscaler for the application node pool will be configured with a minimum of 3 nodes and a maximum of 6 nodes distributed across availability zones as per Azure's zone balancing. For development app environments, the autoscaler for the application node pool will be configured with a minimum of 1 node and a maximum of 4 nodes by default.
The autoscaler for the system node pool will be configured with a minimum of 2 nodes and a maximum of 3 nodes for production app environments. For development app environments, the autoscaler for the system node pool will be configured with a minimum of 1 node and a maximum of 2 nodes by default.
For both production and development app environments, the default node size for the system node pool is Standard_D4d_v5 with 4 vCPUs and 16GB of memory. This size has been chosen because of the minimum requirements for system Node Pools.
For the application node pool, the default node size differs based on the app environment. For production app environments, the default node size is Standard_D4ls_v6 with 4 vCPUs and 8GB of memory. For development app environments, the default node size is Standard_D2ls_v6 with 2 vCPUs and 4GB of memory.
If the CPU or memory requirements of the application defined in the app blueprint cause the default node size to not be able to comfortably run 2 instances of the consumer application, a larger node size will be selected.
Min and max node count along with the node size for both system and application node pools can be overridden in the deploy configuration.
The Kubernetes Horizontal Pod Autoscaler is used to scale the number of pods running the application based on CPU utilisation and average memory utilisation. In development app environments, the minimum number of pods is set to 1 and the maximum number of pods is set to 6 by default. In production app environments, the minimum number of pods is set to 2 and the maximum number of pods is set to 12 by default. The minimum and maximum number of pods can be overridden in the deploy configuration.
When it comes to networking, the application will be deployed with the overlay network model in a public network as per the default AKS access mode. Read about private and public clusters for AKS.
When you define a VPC and link it to the application, it will be deployed as a private cluster using the VNET integration feature of AKS where the control plane will not be made available through a public endpoint. The celerity.consumer.vpc.subnetType annotation has no effect for AKS deployments as the networking model for Azure with it's managed Kubernetes offering is different from other cloud providers and all services running on a cluster are private by default.
Memory and CPU resources allocated to the consumer pod can be defined in the deploy configuration, if not specified, the consumer will derive memory and CPU from handlers configured for the application. If memory and CPU is not defined in the deploy configuration and can not be derived from the handlers, some defaults will be set. For production app environments, the pod that runs the consumer will be allocated a limit of 1,792MB of memory and 0.8 vCPUs. For development app environments, the pod that runs the consumer application will be allocated a limit of 870MB of memory and 0.4 vCPUs.
The OpenTelemetry Operator is used to configure a sidecar collector container for the consumer application to collect traces and metrics. Traces will only be collected if tracing is enabled for the handlers that process messages.
Azure Functions
On Azure Functions, Azure Functions are deployed for the handlers which are triggered by a queue.
When the sourceId is a Celerity topic, an Azure Service Bus Queue is created to subscribe to the topic to implement a reliable and scalable fan-out approach. The Azure Service Bus Queue will then be configured as a trigger for the deployed Azure Function(s).
For other event sources such as data sources or blob storage containers, either a direct trigger is set up for the consumer handlers or an integration with Service Bus is configured to be able to trigger the consumer application functions through Service Bus.
Configuration mappings. celerity/consumer fields would map to Service Bus, Cosmos DB and Event Hubs triggers for Azure Functions as follows.
N/A means the service has no equivalent setting; — means the field doesn't apply to that source type.
| Celerity Consumer | Service Bus Queue | Cosmos DB trigger | Event Hubs trigger |
|---|---|---|---|
batchSize | maxMessagesBatchSize (default: 1000) | maxItemsPerInvocation | maxItemsPerInvocation |
visibilityTimeout | N/A | — | — |
waitTimeSeconds | maxBatchWaitTime (default: 00:00:30, max: 00:02:30) | — | — |
partialFailures | N/A | N/A | N/A |
dbStreamId | — | {databaseName}:{collectionName} | — |
dataStreamId | — | — | A combination of Event Hubs trigger attributes |
startFromBeginning | — | startFromBeginning | N/A |
For Celerity topic sources, celerity.consumer.deadLetterQueueMaxAttempts would map to the Service Bus queue's MaxDeliveryCount (default: 10, max: 2000).
When it comes metrics and tracing for the Azure Functions that process messages, traces and metrics go to Application Insights by default, from which you can export logs, traces and metrics to other tools like Grafana with plugins that use Azure Monitor as a data source.
OpenTelemetry for Azure Functions is also supported for some languages, you can use the azure.serverless.functions.otel deploy configuration option to enable OpenTelemetry for Azure Functions.
Consumers can be deployed to Azure Functions with Azure Service Bus Queue triggers using deploy configuration for the Azure Serverless target environment.
App Deploy Configuration
azure.consumer.containerApps.minExecutions
The minimum number of executions for the consumer application when deployed to Azure Container Apps. This is used to determine the minimum number of tasks that will be running the consumer application.
This is used when the target environment is azure and azure.compute.containerService is set to containerApps.
Type
number
Deploy Targets
azure
Default Value
The default value is 0 for both production and development app environments.
Example
{
"deployTarget": {
"name": "azure",
"appEnv": "production",
"config": {
"azure.consumer.containerApps.minExecutions": 2
}
}
}azure.consumer.containerApps.maxExecutions
The maximum number of executions for the consumer application when deployed to Azure Container Apps. This is used to determine the maximum number of tasks that will be running the consumer application.
This is used when the target environment is azure and azure.compute.containerService is set to containerApps.
Type
number
Deploy Targets
azure
Default Value
The default value is 10 for production app environments and 5 for development app environments.
Example
{
"deployTarget": {
"name": "azure",
"appEnv": "production",
"config": {
"azure.consumer.containerApps.maxExecutions": 10
}
}
}celerity/schedule
Container Apps and AKS
On Container Apps and AKS, schedule applications are deployed as a containerised version of the Celerity runtime.
Schedule applications can be deployed to Azure Container Apps or Azure Kubernetes Service (AKS) using deploy configuration for the Azure target environment.
Container Apps
Container Apps is a relatively simple environment to deploy applications to, the schedule application is deployed as an event-driven job with the schedule trigger type.
Autoscaling is determined based on CPU and memory usage of the underlying VMs running the workload. By default, the scaling rules are set to scale the number of instances with a minimum of 0 executions and a maximum of 10 executions in production app environments. For development app environments, the default configuration is set to scale from 0 to 5 executions. Deploy configuration can be used to override this behaviour.
Container Apps will not be associated with a private network by default, a VNet is automatically generated for you and generated VNets are publicly accessible over the internet. Read about networking for Container Apps. When you define a VPC and link it to the schedule application, a custom VNet will be provisioned and the schedule application will be deployed to either a private or public subnet based on the celerity.schedule.vpc.subnetType annotation, defaulting to a public subnet if not specified. As schedule applications are triggered by the the Container Apps Jobs service, availability guarantees for a schedule application relies on the Azure Container Apps platform.
Memory and CPU resources allocated to the application can be defined in the deploy configuration, when not defined, memory and CPU will be derived from the handlers configured for the application. If memory and CPU is not defined in the deploy configuration and can not be derived from the handlers, some defaults will be set. For production app environments, the Container App job will be allocated a limit of 2GB of memory and 1 vCPU per instance in the consumption plan, see allocation requirements. For development app environments, the Container App job will be allocated a limit of 1GB of memory and 0.5 vCPUs per instance in the consumption plan.
The OpenTelemetry Data Agent is used to collect traces and metrics for the application. Traces will only be collected if tracing is enabled for the handlers that process messages.
Warning
When deploying to the Azure environment with Container Apps, schedule applications can not be combined into a single application with an API. To utilise the Azure Container Apps jobs environment to do the heavy lifting when it comes to scaling and launching jobs, schedule applications must be background jobs that are not accessible from the public internet and only run when triggered by a message in the queue.
AKS
When a schedule application is first deployed to AKS, a new cluster is created for the application unless you specify an existing cluster to use in the deploy configuration.
Using existing clusters
When using an existing cluster, it must be configured in a way that is compatible with the VPC annotations configured for the application as well as the target compute type.
Cost of running on AKS
Running a Celerity application on AKS will often not be the most cost-effective option for schedule applications that are not expected to use a lot of resources. The default configuration uses instances that meet the minimum requirements to run Kubernetes in AKS that will cost hundreds of US dollars a month to run. If you are looking for a cost-effective solution for low-load applications on Azure, consider using Azure Container Apps instead.
Azure Logic App triggers are created to send messages to an Azure Storage Queue at the scheduled time or interval defined in the schedule field of the celerity/schedule resource. The Celerity runtime will poll the queue for messages to trigger the handlers in the schedule application.
The cluster is created across 2 availability zones for better availability guarantees. Best effort zone balancing is used with Azure VM Scale Sets. 2 separate node pools will be configured for the cluster, 1 for the Kubernetes system components and 1 for your application. When using an existing cluster, a new node pool will be created specifically for this application.
The cluster is configured with an autoscaler for each node pool. For production app environments, by default, the autoscaler for the application node pool will be configured with a minimum of 3 nodes and a maximum of 6 nodes distributed across availability zones as per Azure's zone balancing. For development app environments, the autoscaler for the application node pool will be configured with a minimum of 1 node and a maximum of 4 nodes by default.
The autoscaler for the system node pool will be configured with a minimum of 2 nodes and a maximum of 3 nodes for production app environments. For development app environments, the autoscaler for the system node pool will be configured with a minimum of 1 node and a maximum of 2 nodes by default.
For both production and development app environments, the default node size for the system node pool is Standard_D4d_v5 with 4 vCPUs and 16GB of memory. This size has been chosen because of the minimum requirements for system Node Pools.
For the application node pool, the default node size differs based on the app environment. For production app environments, the default node size is Standard_D4ls_v6 with 4 vCPUs and 8GB of memory. For development app environments, the default node size is Standard_D2ls_v6 with 2 vCPUs and 4GB of memory.
If the CPU or memory requirements of the application defined in the app blueprint cause the default node size to not be able to comfortably run 2 instances of the schedule application, a larger node size will be selected.
Min and max node count along with the node size for both system and application node pools can be overridden in the deploy configuration.
The Kubernetes Horizontal Pod Autoscaler is used to scale the number of pods running the application based on CPU utilisation and average memory utilisation. In development app environments, the minimum number of pods is set to 1 and the maximum number of pods is set to 6 by default. In production app environments, the minimum number of pods is set to 2 and the maximum number of pods is set to 12 by default. The minimum and maximum number of pods can be overridden in the deploy configuration.
When it comes to networking, the application will be deployed with the overlay network model in a public network as per the default AKS access mode. Read about private and public clusters for AKS.
When you define a VPC and link it to the application, it will be deployed as a private cluster using the VNET integration feature of AKS where the control plane will not be made available through a public endpoint. The celerity.schedule.vpc.subnetType annotation has no effect for AKS deployments as the networking model for Azure with it's managed Kubernetes offering is different from other cloud providers and all services running on a cluster are private by default.
Memory and CPU resources allocated to the schedule application pod can be defined in the deploy configuration, if not specified, the application will derive memory and CPU from handlers configured for the application. If memory and CPU is not defined in the deploy configuration and can not be derived from the handlers, some defaults will be set. For production app environments, the pod that runs the schedule application will be allocated a limit of 1,792MB of memory and 0.8 vCPUs. For development app environments, the pod that runs the schedule application will be allocated a limit of 870MB of memory and 0.4 vCPUs.
The OpenTelemetry Operator is used to configure a sidecar collector container for the schedule application to collect traces and metrics. Traces will only be collected if tracing is enabled for the handlers that process messages.
Azure Functions
On Azure Functions, Azure Functions with timer triggers are deployed for the handlers.
The schedule field would be converted to an NCRONTAB expression for the timer trigger, and input delivered in the trigger payload to the handler.
When it comes to metrics and tracing for the Azure Functions that process messages, traces and metrics go to Application Insights by default, from which you can export logs, traces and metrics to other tools like Grafana with plugins that use Azure Monitor as a data source.
OpenTelemetry for Azure Functions is also supported for some languages, you can use the azure.serverless.functions.otel deploy configuration option to enable OpenTelemetry for Azure Functions.
Schedule applications can be deployed to Azure Functions with timer triggers using deploy configuration for the Azure Serverless target environment.
App Deploy Configuration
azure.schedule.containerApps.minExecutions
The minimum number of executions for the schedule application when deployed to Azure Container Apps. This is used to determine the minimum number of tasks that will be running the schedule application.
This is used when the target environment is azure and azure.compute.containerService is set to containerApps.
Type
number
Deploy Targets
azure
Default Value
The default value is 0 for both production and development app environments.
Example
{
"deployTarget": {
"name": "azure",
"appEnv": "production",
"config": {
"azure.schedule.containerApps.minExecutions": 2
}
}
}azure.schedule.containerApps.maxExecutions
The maximum number of executions for the schedule application when deployed to Azure Container Apps. This is used to determine the maximum number of tasks that will be running the schedule application.
This is used when the target environment is azure and azure.compute.containerService is set to containerApps.
Type
number
Deploy Targets
azure
Default Value
The default value is 10 for production app environments and 5 for development app environments.
Example
{
"deployTarget": {
"name": "azure",
"appEnv": "production",
"config": {
"azure.schedule.containerApps.maxExecutions": 10
}
}
}celerity/datastore
In Azure, celerity/datastore is envisioned to be implemented with Azure Cosmos DB. Detailed notes have not been written yet beyond the following.
Where composite keys are not supported, a data store's sort key would be combined with its partition key to create additional composite indexes. The data store's id output would take a form such as my-account/my-database/users. Time to live may be expressed as a number of seconds from the current time rather than a unix timestamp, as in the Cosmos DB ttl model. A local emulator for the azure and azure-serverless deploy targets has not been chosen yet.
celerity/sqlDatabase
SQL databases will be provisioned using Azure Database for PostgreSQL and MySQL. The database's id output will take a form such as my-server/orders.
When authMode is set to "password", static credentials are generated and used. When authMode is set to "iam", Celerity enables Entra ID Authentication on the Azure Database server. The handler's managed identity is granted database access, and the SDK fetches access tokens from Entra ID at runtime; the credentials provider's user field holds the managed identity's client ID.
celerity/cache
Caches will be provisioned using Azure Cache for Redis.
When authMode is set to "password", a static access key is used. When authMode is set to "iam", Celerity enables Entra ID Authentication on the Azure Cache for Redis instance. The handler's managed identity is granted cache access, and the SDK fetches access tokens from Entra ID at runtime.
celerity/bucket
In Azure, the celerity/bucket resource is implemented using Azure Blob Storage.
When replication is enabled, Celerity will create a replication configuration for the container with a simple rule to replicate objects to the specified regions.
A storage account will be created in each of the specified regions, and the container will be created in each of the storage accounts. A replication policy will be created to replicate objects to the configured regions.
Prefix-based replication is not supported in Azure Blob Storage, so all objects in the container will be replicated to the specified regions.
When updating an existing bucket with replication enabled, Celerity will set a minCreationTime (based on the time the container was created) on the replication policy to ensure existing and new objects are replicated to the specified regions.
Azure supports up to 2 regions for replication
When more than two regions are specified for replication, only the first two regions will be used, as Azure Blob Storage only supports replication to two regions (storage accounts).
Replication regions would be given as Azure region names, such as westus2.
When versioning status is Suspended, blob versioning would be disabled for the storage account, which leaves existing versions intact (see Azure Blob Storage versioning).
Lifecycle rules would map to Blob Storage lifecycle management policies, except for abortIncompleteMultipartUpload and expirationDate, which have no equivalent. The hot, cool and archive storage classes map directly to the Blob Storage access tiers of the same names.
celerity/queue
In the Azure environment, a queue is implemented as an Azure Service Bus queue.
Due to the many advantanges of Azure Service Bus queues over Azure Storage queues, Celerity only supports Service Bus queues for the celerity/queue resource type.
See the comparison of the two services here.
If you need queues that are large in capacity (above 80 GB), you should consider building a custom solution using Azure Storage queues that is either completely vendor-specific or integrates with a Celerity application through an API endpoint or a celerity/topic.
For the standard messaging tier, the maximum message size is 256 KB. For the premium messaging tier, the maximum message size can be up to 100 MB. A deploy configuration option for the maximum message size has not been designed yet; it would depend on the messaging tier that is used for the queue.
The visibilityTimeout in the queue spec maps to the LockDuration property of the Azure Service Bus queue.
When a celerity/queue is configured to be a dead-letter queue for another, when deployed to Azure Service Bus, it will be configured as a dead-letter queue configured at the subscription level for the Celerity consumer(s) that process messages from the queue.
celerity/topic
In the Azure environment, a topic is implemented as an Azure Service Bus topic.
For tracing, context is propagated through the Service Bus topic using specific payload properties based on the W3C Trace Context standard. This allows for distributed tracing of messages published to the topic. For Celerity applications that consume messages from the topic, the trace context will be extracted and used to trace the processing of the message in the consumer application using libraries such as OpenTelemetry.
When fifo is set to true, a service bus queue will be created using message sessions to ensure that messages are delivered in the order they were published. A session ID must be provided when publishing messages to the topic to ensure that messages are delivered in the order they were published.
There is no built-in message retention support for Azure Service Bus topics, once a message has been successfully delivered to each subscriber, it will be removed from the queue wired up to the topic on behalf of the consumer application.
When a celerity/consumer uses the topic as its source (its sourceId set to the topic's exported ID), a Service Bus Queue would be created to subscribe to messages from the topic and wired up to the consumer application. Message sessions will be configured if the topic is configured as FIFO.
Azure service tiers and message sessions
Message sessions are only supported in the Standard and Premium service tiers of Azure Service Bus. Read about message sessions.
celerity/config
In the Azure environment, secrets and configuration is stored with the Azure Key Vault service.
A secret store will be stored as a single secret in the Key Vault service as a JSON-encoded string of key/value pairs. The store's id output would be the secret name, such as my-secret.
The maximum size of a secret in Azure Key Vault is 25KB, if the secret store exceeds this size, saving the secret will fail. To get around this you can split your secrets and configuration across multiple celerity/config resources.
If replicate is set to true, the secret store will be replicated across multiple regions in a way that is managed by Azure.
The encryptionKeyId field is not supported in Azure Key Vault, Azure manages encryption keys for you.
Rotation
When the rotation field is set in the celerity/config resource, Celerity would automatically rotate secrets that are managed by Celerity.
This is only applicable to secrets that are auto-populated by Celerity for links between handlers or application resource types and infrastructure resources.
An azure function will be created to rotate secrets, which will be triggered by a Timer Trigger to rotate the secrets in the store based on the period (in days) specified in the rotation configuration.
This azure function will have permissions to update the specific infrastructure resources that the config store is linked to, such as an SQL database or a cache.
celerity/vpc
Celerity VPCs are provisioned in Azure using VNets and associated networking resources. The Celerity VPC presets map to configurations of subnets, routing and access controls required for resources such as applications, databases and caches to be placed in the VNet. A referenced VNet is resolved by its Celerity name; as with AWS, Azure VNets are regional, so the referenced VNet must be in the same region as the resources placed into it.
A VNet linked to a celerity/api, celerity/consumer or celerity/schedule would place the application component itself on the containerised azure target. The VNet's id output would be its name, such as my-vnet.
The celerity.handler.vpc.subnetType annotation, and the component-level celerity.<component>.vpc.subnetType that cascades to handlers on azure-serverless, would have no effect: Azure Functions attach to a VNet through VNet integration, which does not offer a choice of public or private subnet.
App Deploy Configuration
These options would be set in the deployTarget.config object in the app deploy configuration file for the azure-serverless target, and apply to every resource type deployed to it.
azure.serverless.functions.otel
When set to true, OpenTelemetry will be enabled for Azure Functions. This feature was in preview at the time of writing (July 2026) and is only supported for a subset of languages.
See the OpenTelemetry for Azure Functions documentation for more information.
This is used when deploying to the azure-serverless target environment.
Type
boolean
Default Value
false
Compute Configuration
These options would be set in the deployTarget.config object in the app deploy configuration file for the azure target. They apply to every compute resource type: celerity/api, celerity/consumer, celerity/schedule and celerity/workflow.
azure.compute.containerService
Determine the container service to use when deploying to the azure target environment.
Type
string
Deploy Targets
azure
Allowed Values
containerApps | aks
Default Value
containerApps
Example
{
"deployTarget": {
"name": "azure",
"appEnv": "production",
"config": {
"azure.compute.containerService": "aks"
}
}
}azure.compute.containerApps.minReplicas
The minimum number of replicas per revision to use when deploying to the azure target environment and the container service is containerApps.
This only applies to Celerity applications that represent an service that is expected to be reached via HTTP requests (i.e. celerity/api and celerity/workflow applications).
Type
number
Deploy Targets
azure
Default Value
By default, this will be 1 for development app environments and 2 for production app environments.
Example
{
"deployTarget": {
"name": "azure",
"appEnv": "production",
"config": {
"azure.compute.containerApps.minReplicas": 2
}
}
}azure.compute.containerApps.maxReplicas
The maximum number of replicas per revision to use when deploying to the azure target environment and the container service is containerApps.
This only applies to Celerity applications that represent an service that is expected to be reached via HTTP requests (i.e. celerity/api and celerity/workflow applications).
Type
number
Deploy Targets
azure
Default Value
By default, this will be 3 for development app environments and 5 for production app environments.
Example
{
"deployTarget": {
"name": "azure",
"appEnv": "production",
"config": {
"azure.compute.containerApps.maxReplicas": 5
}
}
}azure.compute.containerApps.cpu
The maximum amount of vCPU cores that can be used by a single instance of the application running on Container Apps. See Container Apps allocations for more information on the combination of CPU and memory allocations that can be set for Container Apps using the Consumption plan.
Type
number
Deploy Targets
azure
Default Value
If CPU usage is set in the application blueprint for handlers in the application, these will be used to determine reasonable CPU limits for instances instead.
If not set in the blueprint, by default, this will be 0.5 for development app environments and 1 for production app environments.
Example
{
"deployTarget": {
"name": "azure",
"appEnv": "production",
"config": {
"azure.compute.containerApps.cpu": 1
}
}
}azure.compute.containerApps.memory
The maximum amount of memory that can be used by a single instance of the application running on Container Apps. See Container Apps allocations for more information on the combination of CPU and memory allocations that can be set for Container Apps using the Consumption plan.
Type
string
Deploy Targets
azure
Default Value
If memory usage is set in the application blueprint for handlers in the application, these will be used to determine reasonable memory limits for instances instead.
If not set in the blueprint, by default, this will be 1Gi for development app environments and 2Gi for production app environments.
Example
{
"deployTarget": {
"name": "azure",
"appEnv": "production",
"config": {
"azure.compute.containerApps.memory": "2Gi"
}
}
}azure.compute.aks.systemPoolInstanceType
The instance type to use for the system components running on the AKS cluster.
This is used when deploying to the azure target environment and the container service is aks.
Type
string
Deploy Targets
azure
Default Value
By default, this will be Standard_D4d_v5 for both production and development app environments.
See the minimum requirements for system Node Pools when choosing a custom instance type to use for the system components of your cluster.
Example
{
"deployTarget": {
"name": "azure",
"appEnv": "production",
"config": {
"azure.compute.aks.systemPoolInstanceType": "Standard_D4d_v5"
}
}
}azure.compute.aks.appPoolInstanceType
The instance type to use for the application node pools running on the AKS cluster.
This is used when deploying to the azure target environment and the container service is aks.
Type
string
Deploy Targets
azure
Default Value
By default, this will be Standard_D4ls_v6 for production app environments and Standard_D2ls_v6 for development app environments.
Example
{
"deployTarget": {
"name": "azure",
"appEnv": "production",
"config": {
"azure.compute.aks.appPoolInstanceType": "Standard_D4d_v5"
}
}
}azure.compute.aks.systemPoolMinNodes
The minimum number of nodes in the system node pool for the AKS cluster.
This is used when deploying to the azure target environment and the container service is aks.
Type
number
Deploy Targets
azure
Default Value
By default, this will be 1 for development app environments and 2 for production app environments.
Example
{
"deployTarget": {
"name": "azure",
"appEnv": "production",
"config": {
"azure.compute.aks.systemPoolMinNodes": 2
}
}
}azure.compute.aks.systemPoolMaxNodes
The maximum number of nodes in the system node pool for the AKS cluster.
This is used when deploying to the azure target environment and the container service is aks.
Type
number
Deploy Targets
azure
Default Value
By default, this will be 2 for development app environments and 3 for production app environments.
Example
{
"deployTarget": {
"name": "azure",
"appEnv": "production",
"config": {
"azure.compute.aks.systemPoolMaxNodes": 3
}
}
}azure.compute.aks.appPoolMinNodes
The minimum number of nodes in the application node pool for the AKS cluster.
This is used when deploying to the azure target environment and the container service is aks.
Type
number
Deploy Targets
azure
Default Value
By default, this will be 1 for development app environments and 3 for production app environments.
Example
{
"deployTarget": {
"name": "azure",
"appEnv": "production",
"config": {
"azure.compute.aks.appPoolMinNodes": 3
}
}
}azure.compute.aks.appPoolMaxNodes
The maximum number of nodes in the application node pool for the AKS cluster.
This is used when deploying to the azure target environment and the container service is aks.
Type
number
Deploy Targets
azure
Default Value
By default, this will be 3 for development app environments and 6 for production app environments.
Example
{
"deployTarget": {
"name": "azure",
"appEnv": "production",
"config": {
"azure.compute.aks.appPoolMaxNodes": 5
}
}
}azure.compute.aks.podMemory
The amount of memory that can be used by a single pod running the application.
This is used when deploying to the azure target environment and the container service is aks.
Type
string
Deploy Targets
azure
Default Value
If memory usage is set in the application blueprint for handlers in the application, these will be used to determine reasonable memory limits for pods instead.
If not set in the blueprint, by default, this will be 870Mi for development app environments and 1792Mi for production app environments.
Example
{
"deployTarget": {
"name": "azure",
"appEnv": "production",
"config": {
"azure.compute.aks.podMemory": "2Gi"
}
}
}azure.compute.aks.podCPU
The amount of CPU that can be used by a single pod running the application.
This is used when deploying to the azure target environment and the container service is aks.
Type
string
Deploy Targets
azure
Default Value
If CPU usage is set in the application blueprint for handlers in the application, these will be used to determine reasonable CPU limits for pods instead.
If not set in the blueprint, by default, this will be 0.4 for development app environments and 0.8 for production app environments.
Example
{
"deployTarget": {
"name": "azure",
"appEnv": "production",
"config": {
"azure.compute.aks.podCPU": "1"
}
}
}azure.compute.aks.hpa.minReplicas
The minimum number of replicas of a pod that should be running at any time for the Kubernetes horizontal pod autoscaler. This is used when deploying to the azure target environment and the container service is aks.
Type
number
Deploy Targets
azure
Default Value
By default, this will be 1 for development app environments and 2 for production app environments.
Example
{
"deployTarget": {
"name": "azure",
"appEnv": "production",
"config": {
"azure.compute.aks.hpa.minReplicas": 2
}
}
}azure.compute.aks.hpa.maxReplicas
The maximum number of replicas of a pod that should be running at any time for the Kubernetes horizontal pod autoscaler. This is used when deploying to the azure target environment and the container service is aks.
Type
number
Deploy Targets
azure
Default Value
By default, this will be 6 for development app environments and 12 for production app environments.
Example
{
"deployTarget": {
"name": "azure",
"appEnv": "production",
"config": {
"azure.compute.aks.hpa.maxReplicas": 10
}
}
}azure.compute.aks.hpa.targetCPUUtilizationPercentage
The target CPU utilisation percentage for the Kubernetes horizontal pod autoscaler. This will be used in forming the scaling policy for pods running the application.
If azure.compute.aks.hpa.targetCPUAverageValue is also set, this value will take precedence.
This is used when deploying to the azure target environment and the container service is aks.
Type
number
Deploy Targets
azure
Default Value
By default, this will be 50 (percent) for both development and production app environments.
Example
{
"deployTarget": {
"name": "azure",
"appEnv": "production",
"config": {
"azure.compute.aks.hpa.targetCPUUtilizationPercentage": 45
}
}
}azure.compute.aks.hpa.targetCPUAverageValue
The target CPU exact average value for the Kubernetes horizontal pod autoscaler. This will be used in forming the scaling policy for pods running the application.
If azure.compute.aks.hpa.targetCPUUtilizationPercentage is also set, this value will be ignored.
This is used when deploying to the azure target environment and the container service is aks.
Type
string
Deploy Targets
azure
Default Value
If not set, this will not be used, a utilisation percentage will be used instead.
Example
{
"deployTarget": {
"name": "azure",
"appEnv": "production",
"config": {
"azure.compute.aks.hpa.targetCPUAverageValue": "1000m"
}
}
}azure.compute.aks.hpa.targetMemoryUtilizationPercentage
The target memory utilisation percentage for the Kubernetes horizontal pod autoscaler. This will be used in forming the scaling policy for pods running the application.
If azure.compute.aks.hpa.targetMemoryAverageValue is also set, this value will take precedence.
This is used when deploying to the azure target environment and the container service is aks.
Type
number
Deploy Targets
azure
Default Value
By default, this will be 70 (percent) for both development and production app environments.
Example
{
"deployTarget": {
"name": "azure",
"appEnv": "production",
"config": {
"azure.compute.aks.hpa.targetMemoryUtilizationPercentage": 65
}
}
}azure.compute.aks.hpa.targetMemoryAverageValue
The target memory exact average value for the Kubernetes horizontal pod autoscaler. This will be used in forming the scaling policy for pods running the application.
If azure.compute.aks.hpa.targetMemoryUtilizationPercentage is also set, this value will be ignored.
This is used when deploying to the azure target environment and the container service is aks.
Type
string
Deploy Targets
azure
Default Value
If not set, this will not be used, a utilisation percentage will be used instead.
Example
{
"deployTarget": {
"name": "azure",
"appEnv": "production",
"config": {
"azure.compute.aks.hpa.targetMemoryAverageValue": "2000Mi"
}
}
}azure.compute.aks.apiserver
Details to connect to an existing Kubernetes cluster API server to deploy the application. Options for connecting to an existing cluster are not designed yet.
Last updated on