Distributed Workflow Orchestration Platform

Architecture Views

31 views, in reading order. Every view ships three ways: an HTML page, an SVG that re-opens in diagrams.net fully editable, and draw.io source.

An Azure-native platform that executes DAG workflows across a horizontally scalable worker fleet, with durable state, at-least-once task delivery, application-level idempotency, configurable retries, dead-letter recovery and per-tenant backpressure. The set reads in six acts: what sits inside the boundary, how the parts fit, where execution state lives, what happens at runtime, how it is operated, and why it is safe. Six decisions carry the whole design — Cosmos DB is the source of truth and Service Bus only distributes work (view 03); a transactional outbox replaces the dual write that would otherwise lose or invent tasks (views 11 and 13); orchestration is stateless and competing rather than one long-lived actor per execution (view 14); retries are re-enqueued as scheduled messages instead of abandoned onto the queue, so backoff and jitter are real (view 19); the scheduler is the only leader-elected component and it is fenced with a monotonic token rather than trusted with a lease (view 30); and at-least-once is stated as the contract, with idempotency pushed to the task handler and its downstream (view 17).

Context and scope

What the platform is accountable for, who triggers it, what its tasks reach out to, and the plane separation that governs every later view.
01
Trigger sources
Trigger sources
Domain event publishers
CustomerCreated, OrderPaid
Domain event publishers...
Partner webhooks
signed callbacks
Partner webhooks...
Clients and operators
Clients and operators
Business applications
40 tenants
Business applications...
Workflow authors
domain engineers
Workflow authors...
Platform operations
24x7 on-call
Platform operations...
Operations console
execution timeline
Operations console...
Systems tasks act on
Systems tasks act on
Customer 360 platform
Customer 360 platform
Identity verification SaaS
rate limited
Identity verification SaaS...
Enterprise HTTP services
180 endpoints
Enterprise HTTP services...
LLM gateway
quota governed
LLM gateway...
Notification providers
email · SMS · push
Notification providers...
Distributed Workflow Orchestration Platform
DAG execution · at-least-once · multi-tenant
Distributed Workflow Orchestration Pla...
Platform dependencies
Platform dependencies
Microsoft Entra ID
OAuth2 · managed identity
Microsoft Entra ID...
Azure Key Vault
handler credentials
Azure Key Vault...
Azure Monitor
logs · metrics · traces
Azure Monitor...
submit executions
submit executions
publish DAG versions
publish DAG versions
inspect · retry · cancel
inspect · retry · cancel
read status
read status
event triggers
event triggers
inbound triggers
inbound triggers
enrichment tasks
enrichment tasks
identity-check tasks
identity-check tasks
http tasks
http tasks
rag tasks
rag tasks
notification tasks
notification tasks
authenticate
authenticate
resolve secrets
resolve secrets
emit telemetry
emit telemetry
Distributed Workflow Orchestration Platform — System Context
Distributed Workflow Orchestration Platform — System Context
External / third party
External / third party
Person or role
Person or role
synchronous
synchronous
two-way
two-way
event / async
event / async
Task business logic is owned by domain teams and runs inside handlers the platform hosts but does not author.
Task business logic is owned by domain teams and runs inside handlers the platform hosts but does not author.
v 1.0 · owner Data & AI Global Practice · date 2026-08
v 1.0 · owner Data & AI Global Practice · date 2026-08
Text is not SVG - cannot display
System Context Who triggers workflows, what the platform's tasks act on, and what it deliberately never owns. HTML page SVG draw.io
02
Define
Define
Workflow Service
validate · version · publish
Workflow Service...
Admit
Admit
API Management
JWT · quota · throttle
API Management...
Execution API
idempotent submit
Execution API...
Decide
Decide
Orchestration Service
stateless · competing
Orchestration Service...
Scheduler Service
leader-elected
Scheduler Service...
Distribute
Distribute
Outbox Relay
change feed
Outbox Relay...
Azure Service Bus
task + completion queues
Azure Service Bus...
Execute
Execute
Worker Fleet
KEDA-scaled on AKS
Worker Fleet...
Task Handler Plugins
http · c360 · rag · notify
Task Handler Plugins...
Record
Record
Cosmos DB
source of truth
Cosmos DB...
Blob Storage
claim-check payloads
Blob Storage...
Observe
Observe
Azure Monitor
OpenTelemetry
Azure Monitor...
Operator API
retry · replay · cancel
Operator API...
change feed
change feed
TaskCompleted
TaskCompleted
advance DAG
advance DAG
intervene
intervene
High-Level Architecture — Submission to Completion
High-Level Architecture — Submission to Completion
Application we own
Application we own
Interface / broker
Interface / broker
Queue / topic
Queue / topic
Data store
Data store
Security / platform
Security / platform
event / async
event / async
synchronous
synchronous
One journey, one direction, with a single loop: results return through the bus so the orchestrator advances the DAG without holding a thread.
One journey, one direction, with a single loop: results return through the bus so the orchestrator advances the DAG without holding a thread.
v 1.0 · owner Data & AI Global Practice · date 2026-08
v 1.0 · owner Data & AI Global Practice · date 2026-08
Text is not SVG - cannot display
High-Level Architecture The path from a submitted execution to a completed one, in one picture. HTML page SVG draw.io
03
Control plane — state is authoritative here
Control plane — state is authoritative here
Decision services
Decision services
Workflow Service
Workflow Service
Execution API
Execution API
Orchestration Service
Orchestration Service
Scheduler Service
Scheduler Service
Retry Service
Retry Service
System of record
System of record
Definitions
immutable versions
Definitions...
Execution state
ETag guarded
Execution state...
Execution events
append only
Execution events...
Leases
fencing tokens
Leases...
Transport plane — carries work, never truth
Transport plane — carries work, never truth
Service Bus namespace
Service Bus namespace
Task queues
by priority class
Task queues...
Completion queue
Completion queue
Scheduled messages
retry backoff
Scheduled messages...
Dead-letter queues
Dead-letter queues
Execution plane — stateless and replaceable
Execution plane — stateless and replaceable
Worker pools
Worker pools
Pool A — fast HTTP
p95 2s
Pool A — fast HTTP...
Pool B — enrichment
p95 40s
Pool B — enrichment...
Pool C — inference
GPU optional
Pool C — inference...
Downstream systems
HTTP · SaaS · LLM
Downstream systems...
transactional batch
transactional batch
outbox relay
outbox relay
at-least-once
at-least-once
side effect
side effect
TaskCompleted
TaskCompleted
advance DAG
advance DAG
Control, Transport and Execution Planes
Control, Transport and Execution Planes
Application we own
Application we own
Data store
Data store
Queue / topic
Queue / topic
External / third party
External / third party
synchronous
synchronous
event / async
event / async
A worker never writes execution state. It emits a result, and the control plane decides what that result means — which is exactly what makes a worker safe to kill mid-task.
A worker never writes execution state. It emits a result, and the control plane decides what that result means — which is exactly what makes a worker safe to kill mid-task.
v 1.0 · owner Data & AI Global Practice · date 2026-08
v 1.0 · owner Data & AI Global Practice · date 2026-08
Text is not SVG - cannot display
Control, Transport and Execution Planes The one principle every later view obeys: the database is the source of truth, and the queue is only how work travels. HTML page SVG draw.io

Structure

The layering rule, the deployable components, every interface, the messaging topology, and how a workflow definition becomes an immutable, bound version.
04
Experience
Experience
Operations console
React · SSE timeline
Operations console...
Authoring CLI
workflow lint · publish
Authoring CLI...
Client SDKs
.NET · Python · Java
Client SDKs...
API
API
API Management
OAuth2 · quota
API Management...
Workflow API
Workflow API
Execution API
Execution API
Operator API
Operator API
Orchestration
Orchestration
Orchestration Service
DAG advance
Orchestration Service...
Scheduler Service
cron · leader
Scheduler Service...
Trigger Service
event subscriptions
Trigger Service...
Retry Service
backoff · circuit
Retry Service...
Outbox Relay
change feed
Outbox Relay...
Execution
Execution
Worker Runtime
lease · idempotency
Worker Runtime...
Task Handler SDK
execute(context)
Task Handler SDK...
Handler plugins
7 task types
Handler plugins...
Messaging
Messaging
Azure Service Bus
queues · sessions · DLQ
Azure Service Bus...
Azure Event Grid
trigger ingress
Azure Event Grid...
State
State
Azure Cosmos DB
definitions · state · events
Azure Cosmos DB...
Azure Managed Redis
concurrency leases
Azure Managed Redis...
Azure Blob Storage
payloads · artifacts
Azure Blob Storage...
Azure SQL
reporting replica
Azure SQL...
Platform
Platform
AKS
zone redundant
AKS...
Microsoft Entra ID
Microsoft Entra ID
Azure Key Vault
Azure Key Vault
Azure Monitor
OTel · App Insights
Azure Monitor...
Container Registry
Container Registry
HTTPS
HTTPS
enqueue submit
enqueue submit
state + outbox
state + outbox
dispatch
dispatch
lease message
lease message
definition fetch
definition fetch
circuit state
circuit state
Layered Architecture — What Depends on What
Layered Architecture — What Depends on What
Application we own
Application we own
Interface / broker
Interface / broker
Queue / topic
Queue / topic
Data store
Data store
Security / platform
Security / platform
synchronous
synchronous
event / async
event / async
failure / alternate
failure / alternate
One dependency points the wrong way and is drawn in red: workers read task definitions from the Workflow API. It is cached, read-only and version-pinned, and it is tracked as debt rather than hidden.
One dependency points the wrong way and is drawn in red: workers read task definitions from the Workflow API. It is cached, read-only and version-pinned, and it is tracked as debt rather than hidden.
v 1.0 · owner Data & AI Global Practice · date 2026-08
v 1.0 · owner Data & AI Global Practice · date 2026-08
Text is not SVG - cannot display
Layered Architecture What depends on what, and the one dependency that points the wrong way. HTML page SVG draw.io
05
AKS cluster — wfo-prod · Sweden Central · 3 zones
AKS cluster — wfo-prod · Sweden Central · 3 zones
namespace: control
namespace: control
execution-api
.NET 9 · 4 pods
execution-api...
workflow-api
.NET 9 · 3 pods
workflow-api...
operator-api
.NET 9 · 2 pods
operator-api...
orchestration-svc
6-24 pods
orchestration-svc...
scheduler-svc
3 pods · 1 leader
scheduler-svc...
trigger-svc
3 pods
trigger-svc...
retry-svc
3 pods
retry-svc...
outbox-relay
StatefulSet · 4 leases
outbox-relay...
namespace: workers
namespace: workers
worker-http
2-60 pods
worker-http...
worker-customer360
2-30 pods
worker-customer360...
worker-rag
0-20 pods
worker-rag...
worker-notify
2-15 pods
worker-notify...
namespace: platform
namespace: platform
KEDA operator
queue-depth scalers
KEDA operator...
OTel collector
DaemonSet
OTel collector...
Key Vault CSI driver
Key Vault CSI driver
Ingress controller
internal only
Ingress controller...
Azure managed services
Azure managed services
Messaging
Messaging
Service Bus Premium
4 messaging units
Service Bus Premium...
Event Grid
trigger topics
Event Grid...
State
State
Cosmos DB
autoscale 40K RU/s
Cosmos DB...
Managed Redis
concurrency leases
Managed Redis...
Blob Storage
payloads · artifacts
Blob Storage...
Azure SQL
reporting
Azure SQL...
Platform
Platform
API Management
Premium v2
API Management...
Key Vault
Key Vault
Azure Monitor
App Insights
Azure Monitor...
Container Registry
Container Registry
Microsoft Entra ID
Microsoft Entra ID
Downstream systems
HTTP · SaaS · LLM
Downstream systems...
mTLS
mTLS
batch write
batch write
publish
publish
peek-lock
peek-lock
queue depth
queue depth
task call
task call
claim-check
claim-check
Container & Component Architecture
Container & Component Architecture
Application we own
Application we own
Security / platform
Security / platform
Interface / broker
Interface / broker
Queue / topic
Queue / topic
Data store
Data store
External / third party
External / third party
synchronous
synchronous
event / async
event / async
Every pod authenticates with a workload identity federated to Entra ID. No connection string is stored in the cluster; view 28 shows the token path.
Every pod authenticates with a workload identity federated to Entra ID. No connection string is stored in the cluster; view 28 shows the token path.
v 1.0 · owner Data & AI Global Practice · date 2026-08
v 1.0 · owner Data & AI Global Practice · date 2026-08
Text is not SVG - cannot display
Container & Component Architecture Every deployable unit, its replica count, and the managed service it depends on. HTML page SVG draw.io
06
Inbound — consumers and triggers
Inbound — consumers and triggers
Business applications
REST · OAuth2 client creds
Business applications...
Authoring CLI / CI
REST · OIDC
Authoring CLI / CI...
Operations console
REST + SSE
Operations console...
Domain event publishers
Event Grid CloudEvents
Domain event publishers...
Partner webhooks
HMAC signed
Partner webhooks...
Platform edge
Platform edge
API Management
Premium v2 · private
API Management...
Orchestration Platform
control + execution planes
Orchestration Platform...
Egress policy
Azure Firewall FQDN rules
Egress policy...
Outbound — systems the platform calls
Outbound — systems the platform calls
Customer 360 platform
REST · 400 rps cap
Customer 360 platform...
Identity verification SaaS
REST · 50 rps cap
Identity verification SaaS...
Enterprise HTTP services
180 registered endpoints
Enterprise HTTP services...
LLM gateway
token budget per tenant
LLM gateway...
Notification providers
queued
Notification providers...
Enterprise data warehouse
nightly extract
Enterprise data warehouse...
Azure Monitor / Sentinel
OTLP + diagnostic settings
Azure Monitor / Sentinel...
POST /executions
POST /executions
publish version
publish version
status stream
status stream
event trigger
event trigger
inbound callback
inbound callback
enrich
enrich
verify
verify
generic http task
generic http task
rag task
rag task
notify
notify
execution facts
execution facts
telemetry
telemetry
Integration & Interface Catalogue
Integration & Interface Catalogue
External / third party
External / third party
Interface / broker
Interface / broker
Application we own
Application we own
Security / platform
Security / platform
synchronous
synchronous
event / async
event / async
batch
batch
Every outbound call carries the task's own managed identity or a Key Vault-resolved credential, plus the correlationId and taskExecutionId headers that make a downstream retry recognisable.
Every outbound call carries the task's own managed identity or a Key Vault-resolved credential, plus the correlationId and taskExecutionId headers that make a downstream retry recognisable.
v 1.0 · owner Data & AI Global Practice · date 2026-08
v 1.0 · owner Data & AI Global Practice · date 2026-08
Text is not SVG - cannot display
Integration & Interface Catalogue Every way something enters or leaves the platform, with protocol, direction and cadence. HTML page SVG draw.io
07
Service Bus Premium — shared namespace (sb-wfo-prod)
Service Bus Premium — shared namespace (sb-wfo-prod)
Work distribution — one queue per priority class
Work distribution — one queue per priority class
tasks-high
lock 5 min · prefetch 8
tasks-high...
tasks-standard
lock 5 min · prefetch 32
tasks-standard...
tasks-bulk
lock 5 min · prefetch 64
tasks-bulk...
tasks-longrunning
sessions · renew to 2 h
tasks-longrunning...
Control and results
Control and results
task-completions
sessions on executionId
task-completions...
workflow-control
cancel · pause · resume
workflow-control...
scheduled-retries
native scheduled messages
scheduled-retries...
Failure handling
Failure handling
Native DLQ (per queue)
maxDelivery 10 · TTL expiry
Native DLQ (per queue)...
dlq-drain
moves to Cosmos store
dlq-drain...
Poison quarantine
unparseable messages
Poison quarantine...
Dedicated namespace — tier-1 tenant escape hatch
Dedicated namespace — tier-1 tenant escape hatch
sb-wfo-tenant-a
sb-wfo-tenant-a
tasks-tenant-a
noisy-neighbour isolation
tasks-tenant-a...
completions-tenant-a
completions-tenant-a
Trigger ingress
Trigger ingress
Azure Event Grid
Azure Event Grid
Custom topic
CloudEvents 1.0
Custom topic...
Subscription filters
eventType + tenantId
Subscription filters...
Event Grid DLQ
Blob container
Event Grid DLQ...
Outbox Relay
Outbox Relay
Worker pools
Worker pools
Orchestration Service
Orchestration Service
Dead-letter store
Cosmos container
Dead-letter store...
dispatch
dispatch
peek-lock
peek-lock
result
result
advance
advance
drain loop
drain loop
enriched record
enriched record
start execution
start execution
Messaging Topology & Queue Classes
Messaging Topology & Queue Classes
Queue / topic
Queue / topic
Application we own
Application we own
Risk / gap
Risk / gap
Interface / broker
Interface / broker
Data store
Data store
event / async
event / async
failure / alternate
failure / alternate
synchronous
synchronous
Service Bus has no message priority, so priority is expressed as separate queues with separate worker deployments and separate KEDA bounds. Sessions are used only where ordering is genuinely required.
Service Bus has no message priority, so priority is expressed as separate queues with separate worker deployments and separate KEDA bounds. Sessions are used only where ordering is genuinely required.
v 1.0 · owner Data & AI Global Practice · date 2026-08
v 1.0 · owner Data & AI Global Practice · date 2026-08
Text is not SVG - cannot display
Messaging Topology & Queue Classes Which queues exist, why there are several, and how a failed message reaches a human. HTML page SVG draw.io
08
Author
Author
Workflow DSL
JSON or YAML DAG
Workflow DSL...
Authoring CLI
lint · dry-run
Authoring CLI...
Submit
Submit
Workflow API
POST /workflows/{n}/versions
Workflow API...
Validate
Validate
Schema valid?
Schema valid?
Acyclic?
Kahn topological sort
Acyclic?...
Task types registered?
Task types registered?
Tenant policy met?
size · handlers · quota
Tenant policy met?...
Rejected before deploy
422 · violation list
Rejected before deploy...
Publish
Publish
Immutable version
content hash · never edited
Immutable version...
Version index
latest · pinned aliases
Version index...
Bind
Bind
Execution binds version
resolved once at submit
Execution binds version...
In-flight executions
keep their own version
In-flight executions...
Retire
Retire
Deprecate version
no new executions
Deprecate version...
Delete blocked
while executions reference it
Delete blocked...
422 + violations
422 + violations
cycle path
cycle path
unknown type
unknown type
quota exceeded
quota exceeded
Workflow Definition — Validation, Versioning and Binding
Workflow Definition — Validation, Versioning and Binding
Application we own
Application we own
Decision point
Decision point
Risk / gap
Risk / gap
Data store
Data store
failure / alternate
failure / alternate
Published versions are immutable and content-addressed. Schema evolution is additive: a new optional field publishes as a new version, and nothing already running observes the change.
Published versions are immutable and content-addressed. Schema evolution is additive: a new optional field publishes as a new version, and nothing already running observes the change.
v 1.0 · owner Data & AI Global Practice · date 2026-08
v 1.0 · owner Data & AI Global Practice · date 2026-08
Text is not SVG - cannot display
Workflow Definition — Validation, Versioning and Binding How a DAG becomes an immutable published version, and what a running execution is protected from. HTML page SVG draw.io

Data

Where execution state lives and who owns it, the entities an orchestration decision reads, how data moves with its cadence, and what the event log is actually for.
09
Authoritative — losing this loses the platform
Authoritative — losing this loses the platform
Cosmos DB · account cosmos-wfo-prod · session consistency
Cosmos DB · account cosmos-wfo-prod · session consistency
workflow-definitions
PK /tenantId · no TTL
workflow-definitions...
executions
PK /workflowExecutionId
executions...
execution-events
PK /workflowExecutionId · 90 d
execution-events...
dead-letters
PK /tenantId · 180 d
dead-letters...
leases
PK /leaseName · fencing token
leases...
idempotency-keys
PK /taskExecutionId · 7 d
idempotency-keys...
schedules
PK /tenantId
schedules...
Payload and artifact — referenced, never inlined
Payload and artifact — referenced, never inlined
Blob Storage · ZRS · immutable containers
Blob Storage · ZRS · immutable containers
task-payloads
claim-check > 64 KB · 30 d
task-payloads...
task-outputs
30 d · lifecycle to cool
task-outputs...
deadletter-payloads
180 d · legal hold capable
deadletter-payloads...
definition-archive
WORM · 7 y
definition-archive...
Derived — rebuildable from the event log
Derived — rebuildable from the event log
Reporting and cache
Reporting and cache
Azure SQL reporting
execution facts · 400 d
Azure SQL reporting...
Redis counters
concurrency · circuit state
Redis counters...
Status projections
hot read model
Status projections...
Telemetry — operational, not a system of record
Telemetry — operational, not a system of record
Azure Monitor
Azure Monitor
Log Analytics
30 d hot · 2 y archive
Log Analytics...
Application Insights
traces · 5% sampled
Application Insights...
Audit log export
immutable Blob · 7 y
Audit log export...
change feed
change feed
projection
projection
payload ref
payload ref
payload snapshot
payload snapshot
nightly export
nightly export
Data Architecture — Storage Zones by Ownership and Rebuildability
Data Architecture — Storage Zones by Ownership and Rebuildability
Data store
Data store
Security / platform
Security / platform
event / async
event / async
synchronous
synchronous
batch
batch
The rule that sizes the backup plan: only the authoritative zone is restored from backup. Everything in the derived zone is rebuilt by replaying execution-events, so its RPO is the log's, not its own.
The rule that sizes the backup plan: only the authoritative zone is restored from backup. Everything in the derived zone is rebuilt by replaying execution-events, so its RPO is the log's, not its own.
v 1.0 · owner Data & AI Global Practice · date 2026-08
v 1.0 · owner Data & AI Global Practice · date 2026-08
Text is not SVG - cannot display
Data Architecture & Storage Zones What is authoritative, what is rebuildable, and what the backup plan therefore has to cover. HTML page SVG draw.io
10
tenant
tenant_id PK
name
tier (bronze|silver|gold)
max_concurrent_tasks
max_concurrent_executions
priority_class_default
tenant...
workflow_definition
workflow_id PK
tenant_id FK -> tenant
name
latest_version
owner_team
workflow_definition...
workflow_version
workflow_version_id PK
workflow_id FK -> workflow_definition
version (immutable)
content_hash
dag_json
retry_policy_json
published_at
status (active|deprecated)
workflow_version...
schedule
schedule_id PK
tenant_id FK -> tenant
workflow_id FK -> workflow_definition
cron_expression
timezone
next_fire_at
misfire_policy
schedule...
trigger_subscription
subscription_id PK
workflow_id FK -> workflow_definition
event_type
filter_expression
input_mapping
trigger_subscription...
workflow_execution
workflow_execution_id PK
tenant_id FK -> tenant
workflow_version_id FK -> workflow_version
status
correlation_id
idempotency_key
input_ref
output_ref
created_at / started_at / completed_at
_etag (optimistic concurrency)
workflow_execution...
task_execution
task_execution_id PK
workflow_execution_id FK -> workflow_execution
task_id (DAG node)
task_type
status
attempt_count
depends_on[]
priority_class
next_visible_at
_etag
task_execution...
task_attempt
task_attempt_id PK
task_execution_id FK -> task_execution
attempt_no
worker_id
started_at / ended_at
outcome
error_code
error_message
trace_id / span_id
task_attempt...
execution_event
event_id PK
workflow_execution_id FK -> workflow_execution
sequence_no (gapless)
event_type
payload_json
occurred_at
actor
execution_event...
outbox_message
outbox_id PK
workflow_execution_id FK -> workflow_execution
destination_queue
body_ref
created_at
published_at (null = pending)
outbox_message...
dead_letter_record
dead_letter_id PK
task_execution_id FK -> task_execution
tenant_id FK -> tenant
attempt_count
error_code / error_message
stack_trace
original_payload_ref
disposition (open|retried|discarded)
dead_letter_record...
idempotency_record
task_execution_id PK
handler_name
side_effect_ref
result_ref
completed_at
ttl_seconds
idempotency_record...
concurrency_lease
lease_key PK (scope:tenant:type)
holder_instance_id
fencing_token (monotonic)
acquired_at
expires_at
concurrency_lease...
1 : N
1 : N
1 : N
1 : N
1 : N
1 : N
1 : N
1 : N
1 : N
1 : N
1 : N
1 : N
1 : N
1 : N
1 : N
1 : N
1 : N
1 : N
1 : 0..1
1 : 0..1
1 : 0..1
1 : 0..1
Execution & Metadata Data Model
Execution & Metadata Data Model
workflow_execution and task_execution share the /workflowExecutionId logical partition, which is what lets a state change and its outbox message be written in one transactional batch.
workflow_execution and task_execution share the /workflowExecutionId logical partition, which is what lets a state change and its outbox message be written in one transactional batch.
v 1.0 · owner Data & AI Global Practice · date 2026-08
v 1.0 · owner Data & AI Global Practice · date 2026-08
Text is not SVG - cannot display
Execution & Metadata Data Model The thirteen entities an orchestration decision reads or writes. HTML page SVG draw.io
11
Origin
Origin
Client submit
REST · sync
Client submit...
Schedule fire
cron · 1 min tick
Schedule fire...
Domain event
CloudEvents · async
Domain event...
Admit
Admit
Execution API
validate · authorise
Execution API...
Claim-check split
> 64 KB to Blob
Claim-check split...
Persist
Persist
Transactional batch
state + event + outbox
Transactional batch...
executions container
source of truth
executions container...
Distribute
Distribute
Change feed
ordered per partition
Change feed...
Service Bus
task queues
Service Bus...
Produce
Produce
Worker
handler executes
Worker...
Result + output ref
completion message
Result + output ref...
Project
Project
Projection workers
status · timeline · metrics
Projection workers...
Reporting load
micro-batch · 5 min
Reporting load...
Consume
Consume
Operations console
SSE · sub-second
Operations console...
Data warehouse
nightly extract
Data warehouse...
Azure Monitor
OTLP continuous
Azure Monitor...
payload ref only
payload ref only
state transition
state transition
change feed
change feed
nightly
nightly
Execution Data Flow — Origin to Consumption
Execution Data Flow — Origin to Consumption
External / third party
External / third party
Application we own
Application we own
Queue / topic
Queue / topic
Data store
Data store
Security / platform
Security / platform
synchronous
synchronous
event / async
event / async
batch
batch
Cadence is on every arrow because batch and streaming otherwise look identical. Payloads travel by reference from the moment they exceed 64 KB, so message size stays bounded regardless of workload.
Cadence is on every arrow because batch and streaming otherwise look identical. Payloads travel by reference from the moment they exceed 64 KB, so message size stays bounded regardless of workload.
v 1.0 · owner Data & AI Global Practice · date 2026-08
v 1.0 · owner Data & AI Global Practice · date 2026-08
Text is not SVG - cannot display
Execution Data Flow Where execution data comes from, what happens to it on the way, and at what cadence. HTML page SVG draw.io
12
Decide
Decide
Append
Append
Project
Project
Serve
Serve
Command path
Command path
Orchestration Service
validates transition
Orchestration Service...
Transactional batch
state + event + outbox
Transactional batch...
Event log
Event log
execution-events
gapless seq per execution
execution-events...
Change feed processor
ordered · at-least-once
Change feed processor...
Projectors
Projectors
Status projector
Status projector
Timeline projector
Timeline projector
Metrics projector
Metrics projector
Read models
Read models
Execution status doc
p95 < 40 ms read
Execution status doc...
SSE status stream
SSE status stream
SQL fact tables
SQL fact tables
Recovery
Recovery
Replay from sequence
operator initiated
Replay from sequence...
Rebuilt projection
swap on catch-up
Rebuilt projection...
one write
one write
append
append
change feed
change feed
rebuild
rebuild
Execution Event Log & State Projection
Execution Event Log & State Projection
Application we own
Application we own
Data store
Data store
Interface / broker
Interface / broker
synchronous
synchronous
event / async
event / async
batch
batch
This is event sourcing used for recovery and audit, not for reads. Current state is materialised in the same write as the event, so no read path depends on replaying the log — but every projection can be thrown away and rebuilt.
This is event sourcing used for recovery and audit, not for reads. Current state is materialised in the same write as the event, so no read path depends on replaying the log — but every projection can be thrown away and rebuilt.
v 1.0 · owner Data & AI Global Practice · date 2026-08
v 1.0 · owner Data & AI Global Practice · date 2026-08
Text is not SVG - cannot display
Execution Event Log & State Projection What the event log is for, and what it is deliberately not used for. HTML page SVG draw.io

Runtime

The nine flows that are the platform: submission, dependency resolution, triggering, the task state machine, duplicate delivery, the worker pipeline, retries, dead-lettering and backpressure.
13
Client application
Client application
API Management
API Management
Execution API
Execution API
Cosmos DB
Cosmos DB
Outbox Relay
Outbox Relay
Service Bus
Service Bus
Worker
Worker
Orchestration Service
Orchestration Service
1. POST /workflows/customer-onboarding/executions
1. POST /workflows/customer-onboarding/executions
2. validate JWT · tenant quota · rate limit
2. validate JWT · tenant quota · rate limit
3. forward with tenantId claim
3. forward with tenantId claim
4. read pinned workflow version
4. read pinned workflow version
5. check Idempotency-Key header
5. check Idempotency-Key header
6. batch: execution PENDING + root tasks + event + outbox
6. batch: execution PENDING + root tasks + event + outbox
7. committed · _etag
7. committed · _etag
8. 202 Accepted · executionId
8. 202 Accepted · executionId
9. change feed · pending outbox rows
9. change feed · pending outbox rows
10. send task message · MessageId = taskExecutionId
10. send task message · MessageId = taskExecutionId
11. mark published_at
11. mark published_at
12. peek-lock deliver
12. peek-lock deliver
13. idempotency claim · execute handler
13. idempotency claim · execute handler
14. TaskCompleted to completions queue
14. TaskCompleted to completions queue
15. session-ordered completion
15. session-ordered completion
16. transition · dispatch ready successors
16. transition · dispatch ready successors
Critical Flow — Submission, Persistence and First Dispatch
Critical Flow — Submission, Persistence and First Dispatch
The client is answered at step 8, before any task runs. Everything after that point is recoverable from Cosmos alone, which is what makes the API able to promise 202 in under 300 ms.
The client is answered at step 8, before any task runs. Everything after that point is recoverable from Cosmos alone, which is what makes the API able to promise 202 in under 300 ms.
v 1.0 · owner Data & AI Global Practice · date 2026-08
v 1.0 · owner Data & AI Global Practice · date 2026-08
Text is not SVG - cannot display
Submission, Persistence and First Dispatch The critical flow, end to end, including where the client is answered and why that is safe. HTML page SVG draw.io
14
Level 0 — root
Level 0 — root
create-customer
http · no dependencies
create-customer...
Level 1 — fan-out
Level 1 — fan-out
verify-identity
identity-check
verify-identity...
score-risk
customer360
score-risk...
fetch-credit-file
http · 6 s p95
fetch-credit-file...
Join gate
Join gate
All predecessors COMPLETED?
counter reaches zero
All predecessors COMPLETED?...
Tenant slot available?
Tenant slot available?
Deferred
re-evaluated on release
Deferred...
Level 2 — join
Level 2 — join
enrich-customer
customer360
enrich-customer...
Level 3
Level 3
send-notification
notification
send-notification...
Terminal
Terminal
Execution COMPLETED
output assembled
Execution COMPLETED...
Any task DEAD_LETTERED
execution FAILED
Any task DEAD_LETTERED...
ready
ready
at limit
at limit
on failure
on failure
DAG Dependency Resolution & Concurrent Fan-Out
DAG Dependency Resolution & Concurrent Fan-Out
Application we own
Application we own
Decision point
Decision point
Risk / gap
Risk / gap
synchronous
synchronous
failure / alternate
failure / alternate
Readiness is a pending-predecessor counter on each task document, decremented inside the same ETag-guarded write that records the predecessor's completion. Two orchestrators racing the same completion cannot both dispatch the successor.
Readiness is a pending-predecessor counter on each task document, decremented inside the same ETag-guarded write that records the predecessor's completion. Two orchestrators racing the same completion cannot both dispatch the successor.
v 1.0 · owner Data & AI Global Practice · date 2026-08
v 1.0 · owner Data & AI Global Practice · date 2026-08
Text is not SVG - cannot display
DAG Dependency Resolution & Concurrent Fan-Out How the orchestrator decides a task is ready, without any instance owning the execution. HTML page SVG draw.io
15
Trigger
Trigger
Admit
Admit
Create execution
Create execution
Dispatch
Dispatch
Immediate
Immediate
Client POST
synchronous request
Client POST...
Execution API
Idempotency-Key honoured
Execution API...
execution PENDING
202 returned
execution PENDING...
Outbox → task queue
Outbox → task queue
Scheduled
Scheduled
Cron definition
IANA timezone · DST aware
Cron definition...
Scheduler leader
60 s tick · fencing token
Scheduler leader...
Misfire policy applied
skip · run-once · catch-up
Misfire policy applied...
Same dispatch path
Same dispatch path
Event-driven
Event-driven
CloudEvent
Event Grid custom topic
CloudEvent...
Trigger Service
filter + input mapping
Trigger Service...
Dedupe on event id
24 h window
Dedupe on event id...
Same dispatch path
Same dispatch path
Operator replay
Operator replay
Replay request
from DLQ or history
Replay request...
Operator API
RBAC + reason required
Operator API...
New execution
parent_execution_id linked
New execution...
Same dispatch path
Same dispatch path
Trigger Modes — Immediate, Scheduled, Event-Driven and Replay
Trigger Modes — Immediate, Scheduled, Event-Driven and Replay
External / third party
External / third party
Application we own
Application we own
Data store
Data store
Queue / topic
Queue / topic
Decision point
Decision point
Person or role
Person or role
synchronous
synchronous
event / async
event / async
Four entry points, one execution path. Every mode converges on the same execution document and the same outbox, so nothing downstream of admission needs to know how a workflow was started.
Four entry points, one execution path. Every mode converges on the same execution document and the same outbox, so nothing downstream of admission needs to know how a workflow was started.
v 1.0 · owner Data & AI Global Practice · date 2026-08
v 1.0 · owner Data & AI Global Practice · date 2026-08
Text is not SVG - cannot display
Trigger Modes — Immediate, Scheduled, Event-Driven and Replay Four ways an execution starts, and the single path they all converge on. HTML page SVG draw.io
16
Created
Created
PENDING
dependencies unmet
PENDING...
Dispatched
Dispatched
SCHEDULED
outbox published
SCHEDULED...
WAITING_SLOT
concurrency deferred
WAITING_SLOT...
Executing
Executing
RUNNING
lock held · renewed
RUNNING...
Handler outcome?
Handler outcome?
Lease lost
worker died
Lease lost...
Outcome
Outcome
COMPLETED
terminal
COMPLETED...
CANCELLED
terminal
CANCELLED...
TIMED_OUT
task or workflow deadline
TIMED_OUT...
Failure triage
Failure triage
Retryable class?
transient vs permanent
Retryable class?...
Attempts remaining?
maxAttempts 5
Attempts remaining?...
Terminal
Terminal
RETRY_SCHEDULED
backoff + jitter
RETRY_SCHEDULED...
DEAD_LETTERED
terminal · operator owned
DEAD_LETTERED...
deps met
deps met
at limit
at limit
slot freed
slot freed
lock acquired
lock acquired
lock expiry
lock expiry
redelivered
redelivered
success
success
cancel signal
cancel signal
failure
failure
deadline
deadline
transient
transient
permanent
permanent
yes
yes
exhausted
exhausted
if retryable
if retryable
after delay
after delay
Task State Machine — Transitions, Guards and Terminal States
Task State Machine — Transitions, Guards and Terminal States
Application we own
Application we own
Decision point
Decision point
Risk / gap
Risk / gap
synchronous
synchronous
failure / alternate
failure / alternate
event / async
event / async
v 1.0 · owner Data & AI Global Practice · date 2026-08
v 1.0 · owner Data & AI Global Practice · date 2026-08
Text is not SVG - cannot display
Task State Machine Every state a task can be in, every legal transition, and the three that are terminal. HTML page SVG draw.io
17
Service Bus
Service Bus
Worker 1
Worker 1
Worker 2
Worker 2
Idempotency store
Idempotency store
Downstream system
Downstream system
Orchestration Service
Orchestration Service
Cosmos DB
Cosmos DB
1. deliver taskExecutionId 82f3 · attempt 1
1. deliver taskExecutionId 82f3 · attempt 1
2. claim 82f3 · IN_PROGRESS · lease 5 min
2. claim 82f3 · IN_PROGRESS · lease 5 min
3. POST /customers · Idempotency-Key: 82f3
3. POST /customers · Idempotency-Key: 82f3
4. 201 Created
4. 201 Created
5. pod evicted before recording result
5. pod evicted before recording result
6. lock expired · redeliver 82f3
6. lock expired · redeliver 82f3
7. read 82f3 → IN_PROGRESS, lease stale
7. read 82f3 → IN_PROGRESS, lease stale
8. POST /customers · Idempotency-Key: 82f3
8. POST /customers · Idempotency-Key: 82f3
9. 200 OK · same resource, no second customer
9. 200 OK · same resource, no second customer
10. mark COMPLETED · result ref
10. mark COMPLETED · result ref
11. TaskCompleted · complete message
11. TaskCompleted · complete message
12. completion for 82f3
12. completion for 82f3
13. transition RUNNING → COMPLETED (ETag)
13. transition RUNNING → COMPLETED (ETag)
14. already COMPLETED → no-op, message settled
14. already COMPLETED → no-op, message settled
At-Least-Once Delivery — Duplicate Execution Without Duplicate Effect
At-Least-Once Delivery — Duplicate Execution Without Duplicate Effect
The platform guarantees the key, not the absence of duplicates. Where a downstream cannot honour an idempotency key, the handler declares itself non-retryable and the task dead-letters on first failure instead of risking a second side effect.
The platform guarantees the key, not the absence of duplicates. Where a downstream cannot honour an idempotency key, the handler declares itself non-retryable and the task dead-letters on first failure instead of risking a second side effect.
v 1.0 · owner Data & AI Global Practice · date 2026-08
v 1.0 · owner Data & AI Global Practice · date 2026-08
Text is not SVG - cannot display
At-Least-Once Delivery & Idempotency The duplicate the platform promises will happen, and what stops it becoming a duplicate side effect. HTML page SVG draw.io
18
Receive
Receive
Peek-lock receive
prefetch 32
Peek-lock receive...
Envelope validation
schema + version
Envelope validation...
Guard
Guard
Cancelled or superseded?
Cancelled or superseded?
Idempotency claim
taskExecutionId
Idempotency claim...
Local semaphore
per type · per tenant
Local semaphore...
Prepare
Prepare
Resolve handler
plugin registry
Resolve handler...
Hydrate payload
claim-check from Blob
Hydrate payload...
Acquire credential
workload identity
Acquire credential...
Execute
Execute
execute(context)
handler contract
execute(context)...
Lock auto-renewal
background · to 2 h
Lock auto-renewal...
Timeout watchdog
per-task deadline
Timeout watchdog...
Record
Record
Persist output
Blob if > 64 KB
Persist output...
Idempotency COMPLETED
Idempotency COMPLETED
Emit TaskCompleted
completions queue
Emit TaskCompleted...
Settle
Settle
Complete message
happy path
Complete message...
Close OTel span
trace + task attributes
Close OTel span...
Abandon
transient · immediate redeliver
Abandon...
Dead-letter
poison envelope only
Dead-letter...
transient error
transient error
unparseable
unparseable
Worker Runtime — From Message to Settlement
Worker Runtime — From Message to Settlement
Queue / topic
Queue / topic
Application we own
Application we own
Decision point
Decision point
Data store
Data store
Security / platform
Security / platform
Risk / gap
Risk / gap
failure / alternate
failure / alternate
The runtime does everything except decide what a failure means. It reports the outcome and settles the message; the retry policy and state transition are the control plane's decision, made from the workflow definition.
The runtime does everything except decide what a failure means. It reports the outcome and settles the message; the retry policy and state transition are the control plane's decision, made from the workflow definition.
v 1.0 · owner Data & AI Global Practice · date 2026-08
v 1.0 · owner Data & AI Global Practice · date 2026-08
Text is not SVG - cannot display
Worker Runtime Execution Pipeline What happens between a message arriving and a message being settled. HTML page SVG draw.io
19
Failure
Failure
Task attempt failed
exception · 5xx · timeout
Task attempt failed...
task_attempt written
error code + trace id
task_attempt written...
Classify
Classify
Error taxonomy
transient · throttled · permanent
Error taxonomy...
Retryable?
Retryable?
Budget
Budget
Retry policy
max 5 · exp · 2 s → 5 m
Retry policy...
Attempts remaining?
Attempts remaining?
Backoff
Backoff
delay = min(2s·2ⁿ, 5m)
full jitter applied
delay = min(2s·2ⁿ, 5m)...
Scheduled message
Service Bus enqueue time
Scheduled message...
Circuit
Circuit
Handler circuit state
Redis · per task type
Handler circuit state...
Circuit open?
Circuit open?
Half-open probe
1 in flight
Half-open probe...
Outcome
Outcome
Re-dispatched
attempt n+1
Re-dispatched...
Held, not failed
circuit open · no budget burn
Held, not failed...
Dead-lettered
operator owned
Dead-lettered...
permanent
permanent
exhausted
exhausted
open
open
closed
closed
Retry, Backoff and Circuit Breaking
Retry, Backoff and Circuit Breaking
Risk / gap
Risk / gap
Data store
Data store
Application we own
Application we own
Decision point
Decision point
Queue / topic
Queue / topic
failure / alternate
failure / alternate
synchronous
synchronous
Retries are re-enqueued as new scheduled messages rather than abandoned back onto the queue. Backoff can then exceed the lock duration, jitter is real, and the attempt count lives in state where the workflow definition can govern it.
Retries are re-enqueued as new scheduled messages rather than abandoned back onto the queue. Backoff can then exceed the lock duration, jitter is real, and the attempt count lives in state where the workflow definition can govern it.
v 1.0 · owner Data & AI Global Practice · date 2026-08
v 1.0 · owner Data & AI Global Practice · date 2026-08
Text is not SVG - cannot display
Retry, Backoff & Circuit Breaking How a failure becomes another attempt, and how a failing dependency stops consuming the retry budget. HTML page SVG draw.io
20
Detect
Detect
Capture
Capture
Triage
Triage
Disposition
Disposition
Automatic
Automatic
Retries exhausted
application dead-letter
Retries exhausted...
Native DLQ
maxDelivery · TTL · poison
Native DLQ...
dlq-drain job
60 s poll · both sources
dlq-drain job...
Auto-classification
error code → cause group
Auto-classification...
Dead-letter store
Dead-letter store
dead_letter_record
full error + attempt history
dead_letter_record...
Payload snapshot
Blob · 180 d
Payload snapshot...
Searchable index
tenant · type · errorCode
Searchable index...
Operator
Operator
DLQ depth alert
> 50 in 15 min
DLQ depth alert...
Inspect timeline
events + traces + payload
Inspect timeline...
Retry task
same execution
Retry task...
Replay execution
new id · parent linked
Replay execution...
Discard
reason mandatory
Discard...
Terminate execution
compensations fire
Terminate execution...
Effect on state
Effect on state
New task_attempt
attempt count preserved
New task_attempt...
Execution FAILED
audited with actor
Execution FAILED...
Dead-Letter Capture and Operator Recovery
Dead-Letter Capture and Operator Recovery
Risk / gap
Risk / gap
Queue / topic
Queue / topic
Application we own
Application we own
Data store
Data store
Security / platform
Security / platform
Person or role
Person or role
failure / alternate
failure / alternate
synchronous
synchronous
event / async
event / async
Two failure sources, one queue for humans. Native Service Bus dead-letters are infrastructure problems and application dead-letters are business problems, but an operator should never have to know which console to open.
Two failure sources, one queue for humans. Native Service Bus dead-letters are infrastructure problems and application dead-letters are business problems, but an operator should never have to know which console to open.
v 1.0 · owner Data & AI Global Practice · date 2026-08
v 1.0 · owner Data & AI Global Practice · date 2026-08
Text is not SVG - cannot display
Dead-Letter Capture and Operator Recovery Where a task goes when retries are exhausted, and the five things a human can do about it. HTML page SVG draw.io
21
API admission
API admission
Dispatch decision
Dispatch decision
Worker runtime
Worker runtime
Infrastructure
Infrastructure
Tenant
Tenant
Submission quota
APIM · 600/min gold
Submission quota...
Concurrency lease
Redis · 500 / 100 / 20
Concurrency lease...
Per-tenant prefetch cap
Per-tenant prefetch cap
Dedicated namespace
tier-1 escape hatch
Dedicated namespace...
Task type
Task type
Per-type lease
identity-check ≤ 50
Per-type lease...
Handler semaphore
in-process
Handler semaphore...
Deployment per type
independent scaling
Deployment per type...
Downstream
Downstream
Circuit state check
skip dispatch when open
Circuit state check...
Adaptive rate limiter
honours Retry-After
Adaptive rate limiter...
LLM token budget
per tenant per hour
LLM token budget...
Queue pressure
Queue pressure
429 above depth
> 200K messages
429 above depth...
Priority class routing
high · standard · bulk
Priority class routing...
Max concurrent calls
8 · 32 · 64
Max concurrent calls...
KEDA bounds
min/max replicas
KEDA bounds...
Cluster
Cluster
Pod resource limits
CPU · memory · GOMAXPROCS
Pod resource limits...
Node pool maxima
cluster autoscaler ceiling
Node pool maxima...
Backpressure — Control Scope Against Enforcement Point
Backpressure — Control Scope Against Enforcement Point
Interface / broker
Interface / broker
Data store
Data store
Application we own
Application we own
Queue / topic
Queue / topic
Security / platform
Security / platform
Decision point
Decision point
Risk / gap
Risk / gap
Admission is the only place a request is refused. Everywhere after it, pressure is expressed as delay rather than rejection, because a task already accepted has been promised at-least-once execution.
Admission is the only place a request is refused. Everywhere after it, pressure is expressed as delay rather than rejection, because a task already accepted has been promised at-least-once execution.
v 1.0 · owner Data & AI Global Practice · date 2026-08
v 1.0 · owner Data & AI Global Practice · date 2026-08
Text is not SVG - cannot display
Backpressure & Concurrency Governance Five control scopes against four enforcement points, and the one place a request is actually refused. HTML page SVG draw.io

Operations

Where it runs, how a change reaches production safely, how the fleet scales on queue pressure, what is watched, and the loop an operator actually works in.
22
Azure subscription · sub-wfo-prod · Sweden Central
Azure subscription · sub-wfo-prod · Sweden Central
Hub VNet 10.10.0.0/16 — shared connectivity
Hub VNet 10.10.0.0/16 — shared connectivity
Azure Firewall Premium
FQDN egress allow-list
Azure Firewall Premium...
Azure Bastion
no public SSH
Azure Bastion...
ExpressRoute gateway
corporate reachability
ExpressRoute gateway...
Private DNS zones
privatelink.*
Private DNS zones...
Spoke VNet 10.20.0.0/16 — AKS wfo-prod
Spoke VNet 10.20.0.0/16 — AKS wfo-prod
System node pool
3 nodes · 1 per zone
System node pool...
Control node pool
D8s v5 · 3-9 nodes
Control node pool...
Worker node pool
spot + on-demand · 3-40
Worker node pool...
APIM subnet
Premium v2 · zone redundant
APIM subnet...
Private endpoint subnet
no public data plane
Private endpoint subnet...
Zone-redundant managed services
Zone-redundant managed services
Service Bus Premium
4 MU · zone redundant
Service Bus Premium...
Cosmos DB
single write region · ZR
Cosmos DB...
Managed Redis
Enterprise · ZR
Managed Redis...
Blob Storage
ZRS + GRS for archive
Blob Storage...
Azure SQL
Business Critical · ZR
Azure SQL...
Key Vault
Premium · HSM keys
Key Vault...
Secondary region · Norway East — warm standby, RTO 4 h / RPO 5 min
Secondary region · Norway East — warm standby, RTO 4 h / RPO 5 min
DR footprint
DR footprint
Cosmos read region
async replica · promotable
Cosmos read region...
Blob GRS secondary
Blob GRS secondary
ACR geo-replica
ACR geo-replica
AKS cluster (IaC)
scaled to zero
AKS cluster (IaC)...
Service Bus namespace
empty · no geo-DR pairing
Service Bus namespace...
Microsoft Entra ID
global
Microsoft Entra ID...
Azure Monitor
region-paired workspace
Azure Monitor...
GitHub Actions
OIDC federated
GitHub Actions...
all egress
all egress
private endpoints
private endpoints
async replication
async replication
image push
image push
workload identity
workload identity
Deployment & Infrastructure — Sweden Central, Three Zones
Deployment & Infrastructure — Sweden Central, Three Zones
Security / platform
Security / platform
Interface / broker
Interface / broker
Queue / topic
Queue / topic
Data store
Data store
Risk / gap
Risk / gap
External / third party
External / third party
synchronous
synchronous
event / async
event / async
batch
batch
Service Bus is drawn red in the DR footprint on purpose: in-flight messages do not fail over. Regional recovery replays from Cosmos, which is why the queue was never allowed to be the state store.
Service Bus is drawn red in the DR footprint on purpose: in-flight messages do not fail over. Regional recovery replays from Cosmos, which is why the queue was never allowed to be the state store.
v 1.0 · owner Data & AI Global Practice · date 2026-08
v 1.0 · owner Data & AI Global Practice · date 2026-08
Text is not SVG - cannot display
Deployment & Infrastructure What runs where, which failures it survives, and the recovery posture that was actually bought. HTML page SVG draw.io
23
Source
Source
GitHub monorepo
services · workers · IaC
GitHub monorepo...
Pull request
2 reviewers · CODEOWNERS
Pull request...
Build
Build
GitHub Actions
OIDC to Azure · no PAT
GitHub Actions...
Unit + mutation tests
80% line gate
Unit + mutation tests...
Container build
distroless · SBOM
Container build...
Verify
Verify
Integration tests
Cosmos + SB emulators
Integration tests...
Contract tests
task + workflow events
Contract tests...
Security scan
Defender · Trivy · secrets
Security scan...
Terraform plan
policy-as-code gate
Terraform plan...
Package
Package
Push to ACR
immutable digest tag
Push to ACR...
Sign + attest
Notation · provenance
Sign + attest...
Helm chart to OCI
versioned with image
Helm chart to OCI...
Promote
Promote
dev
auto on merge
dev...
staging
load + chaos suite
staging...
Change approval
manual · change record
Change approval...
Production
Production
Rolling control plane
PDB · maxUnavailable 1
Rolling control plane...
Worker drain-and-replace
finish lease, then exit
Worker drain-and-replace...
Auto rollback
SLO burn > 2% in 15 min
Auto rollback...
on merge
on merge
previous digest
previous digest
CI/CD — How a Change Reaches Production, and What Stops a Bad One
CI/CD — How a Change Reaches Production, and What Stops a Bad One
External / third party
External / third party
Decision point
Decision point
Application we own
Application we own
Security / platform
Security / platform
Risk / gap
Risk / gap
synchronous
synchronous
failure / alternate
failure / alternate
Zero-downtime rests on one worker behaviour: on SIGTERM a worker stops receiving, finishes or abandons its in-flight lease, then exits. terminationGracePeriodSeconds is set above the longest task's lock renewal window.
Zero-downtime rests on one worker behaviour: on SIGTERM a worker stops receiving, finishes or abandons its in-flight lease, then exits. terminationGracePeriodSeconds is set above the longest task's lock renewal window.
v 1.0 · owner Data & AI Global Practice · date 2026-08
v 1.0 · owner Data & AI Global Practice · date 2026-08
Text is not SVG - cannot display
CI/CD and Environments How a change reaches production, and every gate that can stop a bad one. HTML page SVG draw.io
24
Signal
Signal
Active message count
per task queue
Active message count...
Oldest message age
the SLO that matters
Oldest message age...
Decide
Decide
KEDA ScaledObject
azure-servicebus trigger
KEDA ScaledObject...
queueLength 20 / replica
cooldown 300 s
queueLength 20 / replica...
HPA behaviour
up fast · down slow
HPA behaviour...
Scale out
Scale out
Worker replicas 2 → 60
per deployment bounds
Worker replicas 2 → 60...
Cluster autoscaler
spot first, on-demand fallback
Cluster autoscaler...
Absorb
Absorb
900 tasks/s sustained
peak drain target
900 tasks/s sustained...
Tenant leases still cap
fairness survives scale-out
Tenant leases still cap...
Downstream ceiling
400 rps · scaling cannot pass it
Downstream ceiling...
Scale in
Scale in
Cooldown then scale in
5 min stable
Cooldown then scale in...
worker-rag → 0
scale-to-zero, cold start 25 s
worker-rag → 0...
PodDisruptionBudget
min 2 during drain
PodDisruptionBudget...
circuit opens · stop scaling
circuit opens · stop scaling
primary trigger
primary trigger
Queue-Driven Autoscaling with KEDA
Queue-Driven Autoscaling with KEDA
Queue / topic
Queue / topic
Security / platform
Security / platform
Application we own
Application we own
Data store
Data store
Risk / gap
Risk / gap
failure / alternate
failure / alternate
synchronous
synchronous
Depth alone is the wrong trigger: 200,000 cheap messages and 200 expensive ones look identical. Oldest-message-age is scaled against the task scheduling SLO of p95 under one second, and depth is the secondary signal.
Depth alone is the wrong trigger: 200,000 cheap messages and 200 expensive ones look identical. Oldest-message-age is scaled against the task scheduling SLO of p95 under one second, and depth is the secondary signal.
v 1.0 · owner Data & AI Global Practice · date 2026-08
v 1.0 · owner Data & AI Global Practice · date 2026-08
Text is not SVG - cannot display
Queue-Driven Autoscaling with KEDA What the fleet scales on, why it is not queue depth, and where scaling stops helping. HTML page SVG draw.io
25
Instrument
Instrument
Collect
Collect
Store
Store
Consume
Consume
Traces
Traces
W3C traceparent
carried in SB app properties
W3C traceparent...
OTel collector
DaemonSet · OTLP
OTel collector...
Application Insights
5% head · 100% error tail
Application Insights...
Execution waterfall
why did 123 take 47 s
Execution waterfall...
Metrics
Metrics
RED + queue depth
task duration by type
RED + queue depth...
Managed Prometheus
scrape + remote write
Managed Prometheus...
Azure Monitor metrics
93 d retention
Azure Monitor metrics...
SLO dashboards
Grafana · burn rate
SLO dashboards...
Logs
Logs
Structured JSON
tenant · execution · task ids
Structured JSON...
Container Insights
stdout · no PII
Container Insights...
Log Analytics
30 d hot · 2 y archive
Log Analytics...
KQL investigation
saved incident queries
KQL investigation...
Business events
Business events
ExecutionStarted/Failed
domain events, not logs
ExecutionStarted/Failed...
Change feed
ordered per execution
Change feed...
SQL fact tables
400 d
SQL fact tables...
Tenant SLA reporting
monthly attestation
Tenant SLA reporting...
Alerting
Alerting
SLO definitions
as code, versioned
SLO definitions...
Alert rules
burn rate · DLQ · lag
Alert rules...
Action groups
severity routed
Action groups...
On-call + runbook
every alert links one
On-call + runbook...
Observability — Signal Type Against Pipeline Stage
Observability — Signal Type Against Pipeline Stage
Application we own
Application we own
Security / platform
Security / platform
Data store
Data store
Person or role
Person or role
Six identifiers travel together on every log line, span and message: traceId, spanId, correlationId, tenantId, workflowExecutionId and taskExecutionId. Any one of them reconstructs the whole picture.
Six identifiers travel together on every log line, span and message: traceId, spanId, correlationId, tenantId, workflowExecutionId and taskExecutionId. Any one of them reconstructs the whole picture.
v 1.0 · owner Data & AI Global Practice · date 2026-08
v 1.0 · owner Data & AI Global Practice · date 2026-08
Text is not SVG - cannot display
Observability and Distributed Tracing The signals, where they go, and the specific question the design has to be able to answer. HTML page SVG draw.io

Assurance

The trust boundaries and what crosses them, the secretless token path, four layers of tenant isolation with the shared parts named, split-brain prevention, and every failure mode with its declared behaviour.
27
Internet — untrusted
Internet — untrusted
Client applications
confidential clients
Client applications...
Partner callers
HMAC + IP allow-list
Partner callers...
Untrusted caller
credential stuffing · replay
Untrusted caller...
Perimeter — Azure edge, public ingress ends here
Perimeter — Azure edge, public ingress ends here
Front Door + WAF
OWASP ruleset · TLS 1.3
Front Door + WAF...
DDoS Protection
network tier
DDoS Protection...
API Management
validate-jwt · quota · schema
API Management...
Application — private VNet, no public endpoint
Application — private VNet, no public endpoint
Control namespace
APIs · orchestrator · scheduler
Control namespace...
Worker namespace
network policy denies east-west
Worker namespace...
Azure Firewall
FQDN egress allow-list
Azure Firewall...
Data — private endpoints only, RBAC data plane
Data — private endpoints only, RBAC data plane
Cosmos DB
keys disabled · CMK
Cosmos DB...
Service Bus
SAS disabled · Entra RBAC
Service Bus...
Blob Storage
no anonymous · CMK
Blob Storage...
Managed Redis
no persistence of payloads
Managed Redis...
Key Vault
HSM · purge protection
Key Vault...
Identity and assurance — control plane
Identity and assurance — control plane
Microsoft Entra ID
OAuth2 · Conditional Access
Microsoft Entra ID...
Workload identities
federated · no secrets
Workload identities...
PIM for operator roles
JIT · approval · 4 h
PIM for operator roles...
Defender + Sentinel
detections · UEBA
Defender + Sentinel...
Immutable audit log
WORM Blob · 7 y
Immutable audit log...
HTTPS · TLS 1.3
HTTPS · TLS 1.3
blocked
blocked
private origin
private origin
mTLS + tenant claim
mTLS + tenant claim
Private Link · Entra RBAC
Private Link · Entra RBAC
egress · FQDN filtered
egress · FQDN filtered
token, not key
token, not key
JWKS validation
JWKS validation
audit events
audit events
Security Architecture — Trust Zones and What Crosses Them
Security Architecture — Trust Zones and What Crosses Them
External / third party
External / third party
Risk / gap
Risk / gap
Security / platform
Security / platform
Interface / broker
Interface / broker
Application we own
Application we own
Data store
Data store
Queue / topic
Queue / topic
synchronous
synchronous
failure / alternate
failure / alternate
event / async
event / async
Task payloads may contain personal data, so the classification travels with the workflow definition: a task marked restricted may only bind to handlers whose egress FQDN is on the approved list for that classification.
Task payloads may contain personal data, so the classification travels with the workflow definition: a task marked restricted may only bind to handlers whose egress FQDN is on the approved list for that classification.
v 1.0 · owner Data & AI Global Practice · date 2026-08
v 1.0 · owner Data & AI Global Practice · date 2026-08
Text is not SVG - cannot display
Security Architecture — Trust Zones Where the boundaries are, what authenticates at each crossing, and where an attacker would actually arrive. HTML page SVG draw.io
28
Client application
Client application
Microsoft Entra ID
Microsoft Entra ID
API Management
API Management
Execution API pod
Execution API pod
Key Vault
Key Vault
Cosmos DB
Cosmos DB
Service Bus
Service Bus
1. client_credentials · scope api://wfo/.default
1. client_credentials · scope api://wfo/.default
2. access token · 60 min · appid + roles
2. access token · 60 min · appid + roles
3. POST /executions · Bearer
3. POST /executions · Bearer
4. fetch + cache JWKS
4. fetch + cache JWKS
5. validate-jwt · scope · tenant claim · quota
5. validate-jwt · scope · tenant claim · quota
6. forward over mTLS · x-tenant-id
6. forward over mTLS · x-tenant-id
7. exchange projected SA token (workload identity federation)
7. exchange projected SA token (workload identity federation)
8. token for Cosmos and Service Bus scopes
8. token for Cosmos and Service Bus scopes
9. write execution · RBAC data plane, no account key
9. write execution · RBAC data plane, no account key
10. send · Entra RBAC, SAS disabled
10. send · Entra RBAC, SAS disabled
11. resolve legacy downstream credential
11. resolve legacy downstream credential
12. secret · cached 10 min in memory only
12. secret · cached 10 min in memory only
13. 202 Accepted
13. 202 Accepted
Secretless Access — Token Path from Caller to Data Plane
Secretless Access — Token Path from Caller to Data Plane
No connection string or account key exists anywhere in the cluster, so none can be stolen from a compromised pod. The only secrets in Key Vault are third-party credentials for downstreams that cannot speak Entra.
No connection string or account key exists anywhere in the cluster, so none can be stolen from a compromised pod. The only secrets in Key Vault are third-party credentials for downstreams that cannot speak Entra.
v 1.0 · owner Data & AI Global Practice · date 2026-08
v 1.0 · owner Data & AI Global Practice · date 2026-08
Text is not SVG - cannot display
Secretless Access — Token Path How a caller proves who it is, and how a pod reaches a database without holding a credential. HTML page SVG draw.io
29
Layer 1 — Identity and admission
Layer 1 — Identity and admission
Every request carries a tenant
Every request carries a tenant
App registration per tenant
appid → tenantId map
App registration per tenant...
APIM subscription
own key · own quota
APIM subscription...
tenantId claim required
request rejected without it
tenantId claim required...
Tenant-scoped RBAC
operator roles per tenant
Tenant-scoped RBAC...
Layer 2 — Logical data isolation on shared infrastructure
Layer 2 — Logical data isolation on shared infrastructure
Tenant is part of every key
Tenant is part of every key
tenantId in partition key
definitions · dead-letters
tenantId in partition key...
Mandatory query filter
enforced in data layer
Mandatory query filter...
Redis key prefix
t:{tenantId}:*
Redis key prefix...
Container per tenant
user-delegation SAS
Container per tenant...
tenantId message property
filterable · auditable
tenantId message property...
Layer 3 — Runtime fairness
Layer 3 — Runtime fairness
Noisy neighbours are bounded, not blocked
Noisy neighbours are bounded, not blocked
Concurrency lease
gold 500 · silver 100 · bronze 20
Concurrency lease...
Priority class
queue selection per tier
Priority class...
Per-tenant circuit
one tenant cannot trip all
Per-tenant circuit...
Per-tenant SLO view
own dashboard + alerting
Per-tenant SLO view...
Layer 4 — Physical isolation, tier-1 escape hatch
Layer 4 — Physical isolation, tier-1 escape hatch
Bought, not default
Bought, not default
Dedicated SB namespace
Dedicated SB namespace
Dedicated node pool
taint + toleration
Dedicated node pool...
Dedicated Cosmos container
own RU allocation
Dedicated Cosmos container...
Dedicated Key Vault
own CMK
Dedicated Key Vault...
Deliberately shared — the honest part of the model
Deliberately shared — the honest part of the model
A fault here is a fault for everyone
A fault here is a fault for everyone
Control plane pods
all tenants, one deployment
Control plane pods...
AKS cluster
one control plane
AKS cluster...
Cosmos RU pool
shared autoscale ceiling
Cosmos RU pool...
Monitor workspace
RBAC-filtered, not separated
Monitor workspace...
Multi-Tenancy — Four Layers of Isolation, and What Is Shared
Multi-Tenancy — Four Layers of Isolation, and What Is Shared
Security / platform
Security / platform
Interface / broker
Interface / broker
Data store
Data store
Application we own
Application we own
Queue / topic
Queue / topic
Risk / gap
Risk / gap
Isolation is bought in layers, and the last box says what a bronze tenant does not get. A tier-1 tenant that needs a blast radius of one must buy layer 4; nothing in layers 1 to 3 delivers that.
Isolation is bought in layers, and the last box says what a bronze tenant does not get. A tier-1 tenant that needs a blast radius of one must buy layer 4; nothing in layers 1 to 3 delivers that.
v 1.0 · owner Data & AI Global Practice · date 2026-08
v 1.0 · owner Data & AI Global Practice · date 2026-08
Text is not SVG - cannot display
Multi-Tenant Isolation Model Four layers of isolation, what each one costs, and the parts that are honestly shared. HTML page SVG draw.io
30
Scheduler A
Scheduler A
Scheduler B
Scheduler B
Lease document (Cosmos)
Lease document (Cosmos)
Schedule store
Schedule store
Service Bus
Service Bus
Azure Monitor
Azure Monitor
1. conditional write if expired · token 41
1. conditional write if expired · token 41
2. acquired · fencing token 41 · TTL 30 s
2. acquired · fencing token 41 · TTL 30 s
3. renew every 10 s
3. renew every 10 s
4. claim due schedules with token 41
4. claim due schedules with token 41
5. enqueue execution starts
5. enqueue execution starts
6. 35 s stop-the-world pause · renewal missed
6. 35 s stop-the-world pause · renewal missed
7. lease expired · acquire · token 42
7. lease expired · acquire · token 42
8. acquired · fencing token 42
8. acquired · fencing token 42
9. claim due schedules with token 42
9. claim due schedules with token 42
10. resumes · writes with stale token 41
10. resumes · writes with stale token 41
11. rejected · 41 < 42
11. rejected · 41 < 42
12. self-demote · stop firing
12. self-demote · stop firing
13. LeaderChanged event · alert
13. LeaderChanged event · alert
Leader Election — Split Brain and the Fencing Token That Stops It
Leader Election — Split Brain and the Fencing Token That Stops It
The lease alone does not prevent split brain, because A cannot know it lost the lease until it tries to use it. The fencing token does: every write carries it, and the store rejects anything below the highest token it has seen.
The lease alone does not prevent split brain, because A cannot know it lost the lease until it tries to use it. The fencing token does: every write carries it, and the store rejects anything below the highest token it has seen.
v 1.0 · owner Data & AI Global Practice · date 2026-08
v 1.0 · owner Data & AI Global Practice · date 2026-08
Text is not SVG - cannot display
Leader Election and Fencing The one component that needs a single active coordinator, and why a lease alone is not enough. HTML page SVG draw.io
31
Execution plane — expected to fail constantly
Execution plane — expected to fail constantly
Failure → mitigation
Failure → mitigation
Worker crash mid-task
lock expires · redelivered
Worker crash mid-task...
Spot node reclaimed
30 s notice · PDB · drain
Spot node reclaimed...
Handler hangs
watchdog cancels at deadline
Handler hangs...
Poison message
envelope check · DLQ, no retry
Poison message...
Duplicate delivery
idempotency key · view 17
Duplicate delivery...
Control plane — must fail safe
Control plane — must fail safe
Failure → mitigation
Failure → mitigation
Orchestrator dies mid-transition
ETag write atomic · replay safe
Orchestrator dies mid-transition...
Outbox relay lag
checkpointed feed · resumes
Outbox relay lag...
Double dispatch
MessageId dedupe · 10 min
Double dispatch...
Scheduler split brain
fencing token · view 30
Scheduler split brain...
Bad definition deployed
immutable versions · pinned
Bad definition deployed...
Dependency failures — the behaviour must be stated, not discovered
Dependency failures — the behaviour must be stated, not discovered
Failure → declared behaviour
Failure → declared behaviour
Cosmos 429 throttling
SDK retry · autoscale · shed writes
Cosmos 429 throttling...
Cosmos region down
reads fail over · writes 503
Cosmos region down...
Service Bus down
submissions accepted · outbox drains
Service Bus down...
Redis down
leases fail open at reduced limit
Redis down...
Downstream saturated
circuit opens · tasks held
Downstream saturated...
Network partition
no dispatch · no state loss
Network partition...
Accepted residual risk for V1 — signed off, not overlooked
Accepted residual risk for V1 — signed off, not overlooked
Known and priced
Known and priced
Single write region
RTO 4 h · RPO 5 min
Single write region...
In-flight messages not replicated
rebuilt from Cosmos on failover
In-flight messages not replicated...
Exactly-once not offered
at-least-once + idempotency
Exactly-once not offered...
500-task hot partition
10K RU / 20 GB partition cap
500-task hot partition...
Shared control plane
no per-tenant blast radius
Shared control plane...
Chaos experiments
each row has a test in staging
Chaos experiments...
Runbooks
one per failure mode
Runbooks...
pod kill
pod kill
namespace block
namespace block
NSG partition
NSG partition
failover drill
failover drill
Failure Modes, Mitigations and Accepted Residual Risk
Failure Modes, Mitigations and Accepted Residual Risk
Risk / gap
Risk / gap
Application we own
Application we own
failure / alternate
failure / alternate
synchronous
synchronous
Twenty-one failure modes, each with a stated behaviour and a chaos experiment that proves it in staging. The last box is the part a reviewer should argue with: it is what this design chose not to solve in V1.
Twenty-one failure modes, each with a stated behaviour and a chaos experiment that proves it in staging. The last box is the part a reviewer should argue with: it is what this design chose not to solve in V1.
v 1.0 · owner Data & AI Global Practice · date 2026-08
v 1.0 · owner Data & AI Global Practice · date 2026-08
Text is not SVG - cannot display
Failure Modes and Accepted Residual Risk Twenty-one ways this platform fails, what it does about each, and the five it chose not to solve. HTML page SVG draw.io
Open svg/<view>.svg or drawio/<view>.drawio in draw.io Desktop or at app.diagrams.net to edit. The SVG carries the diagram inside it, so it is both the picture and the source. This folder is self-contained — copy it whole and every link still resolves.