Skip to content
DBRaven
Clear

No dimension reached its most severe tier for this scenario.

Full ReviewModerate Readinessdraft

Architecture Review: Distributed Job Queue Platform

A durable background job execution platform where jobs are enqueued via API and executed by competing consumer worker pools. PostgreSQL is the durable job store, job definitions, retry state, scheduling metadata, and dead-letter records persist in PostgreSQL with ACID guarantees, surviving any worker or queue infrastructure failure. Redis tracks in-flight job state (which worker claimed which job, visibility timeout lease expiry) to enable fast lease checks without PostgreSQL queries on the hot path. Temporal provides workflow orchestration for multi-step jobs that require coordination across multiple execution stages, with built-in state machine semantics and durable activity execution. Kafka carries job completion events to downstream consumers (analytics, billing triggers, notification fan-out). Backpressure between the job enqueue rate and worker execution rate prevents runaway job accumulation when workers are degraded.

Evidence Confidence

Moderate

strong

Executive Summary

Distributed Job Queue Platform carries moderate operational readiness (82% evidence confidence). 0 architectural strengths identified, 5 operational risks to manage. Primary concern: Deadlock. Requires Advanced operational maturity.

Readiness Rationale

Overall moderate readiness across 8 dimensions. Weak: consistency. Limited: team maturity. Strong: migration, observability, failure recovery.

Key Concerns

  • !Deadlock
  • !Queue Backlog Accumulation

Key Strengths

  • +Architecture is well-defined for the write heavy application problem profile

8

Assessments

2

Tradeoffs

6

Sections

12

Recommendations

Readiness Assessments

8

Governance Posture

6

Structural boundary and anti-pattern compliance: whether this architecture's topology violates documented governance policies. Distinct from operational readiness (below), which asks whether the team and infrastructure are prepared to run it.

Concerning

6 governance policy matches and 1 anti-pattern match put Distributed Job Queue Platform's governance posture at concerning risk. Resilience is moderate; burden is extreme.

6

violations

1

anti-patterns

Governance Violations

Anti-Pattern Matches

Resilience

moderate

Blast radius: contained

56%

resilience score

Resilience Gaps

  • 3 high-exposure risk nodes increase blast radius
  • No explicit resilience gaps documented in scenario operational risks

Operational Burden

extreme

operational burden

99%

burden index

Complexity Drivers

  • 5 architecture patterns increase configuration surface
  • Visibility timeout miscalibration causing duplicate execution: a job processing
  • PostgreSQL job table lock contention under high enqueue rate: the job table uses

Observability Burden

  • kafka: requires dedicated monitoring instrumentation
  • postgresql: requires dedicated monitoring instrumentation
  • redis: requires dedicated monitoring instrumentation
  • temporal: requires dedicated monitoring instrumentation

Recovery Complexity

  • 3 risk propagation path(s) complicate failure recovery

Maturity

Required

Advanced

Estimated

Advanced

Gap

No Gap

The architecture's required maturity (advanced) aligns with or is below the estimated team capability.

Operational Readiness

7

Adoption readiness: whether the team, infrastructure, and observability are prepared to run this architecture safely. Distinct from governance posture (above), which asks whether the topology itself violates architectural boundaries.

Partialwrite heavy application

Distributed Job Queue Platform has moderate operational complexity requiring 'experienced backend team' team maturity. Readiness is estimated at 55%, proceed with caution. Address the blocking prerequisites before committing to production adoption.

Readiness Score

55%

Blocking Prerequisites

4

Complexity

Moderate

Confidence

Strong

Assessment derived from scenario knowledge, advisor output, topology analysis, and 7 prerequisite checks.

Prerequisite Checklist (4 blocking, 3 non-blocking)

blocking

team

Team at 'experienced backend team' maturity level

This scenario is rated 'experienced backend team' complexity. Engineers with 2+ years of production backend experience, including database tuning and monitoring.

Gap signal: Team frequently reaches for external help during incidents or struggles to debug multi-system issues independently.

blocking

process

Failure mode awareness and runbooks

The team must understand the 5 documented failure modes for this scenario: queue_backlog_accumulation, partial_failure, deadlock, slow_consumer. Each should have a documented detection procedure and runbook.

Gap signal: The team has no documented runbooks for the scenario's failure modes or cannot name them without reference material.

blocking

monitoring

Production-grade observability stack

The scenario requires real-time metrics, structured logging, and distributed tracing on all critical components. Alerting must be configured before going live.

Gap signal: No dashboards exist for the critical path metrics in the scenario.

infrastructure

Minimum team maturity: Experienced Backend Team

This scenario has moderate operational complexity. It is recommended for Experienced Backend Team teams or higher.

Gap signal: The requirement 'Minimum team maturity: Experienced Backend Team' is not yet in place.

infrastructure

Runbooks and alerting for high-severity risks

3 high-severity risks identified. Each requires a documented runbook, alerting threshold, and on-call response procedure before running in production.

Gap signal: The requirement 'Runbooks and alerting for high-severity risks' is not yet in place.

infrastructure

Event stream operations expertise

This architecture includes event stream infrastructure (Kafka, Kinesis, or similar). Operations requires consumer group management, partition assignment, dead-letter handling, and lag monitoring.

Gap signal: The requirement 'Event stream operations expertise' is not yet in place.

blocking

infrastructure

Mitigation for 4 high-risk topology node(s)

Nodes with high or critical risk exposure: Event Streaming, Write-Heavy Transactional, PostgreSQL, Slow Consumer. Each requires documented mitigation before production deployment.

Gap signal: No mitigation strategy is documented for the high-risk nodes in the topology.

Infrastructure Requirements

Apache Kafka

high burden

Distributed event streaming platform designed for high-throughput, fault-tolerant, ordered, and durable log-based messaging between producers and cons

Managed: Amazon MSK (Managed Streaming for Kafka), Confluent Cloud, Azure Event Hubs (Kafka-compatible), Redpanda Cloud

PostgreSQL

medium burden

ACID-compliant relational database with strong consistency, JSONB support, full-text search, and mature replication.

Managed: Amazon RDS for PostgreSQL, Amazon Aurora PostgreSQL, Google Cloud SQL for PostgreSQL, Azure Database for PostgreSQL, Supabase, Neon

Redis

low burden

In-memory key-value store with optional persistence, supporting strings, hashes, lists, sets, sorted sets, and pub/sub.

Managed: Amazon ElastiCache for Redis, Google Cloud Memorystore, Azure Cache for Redis, Redis Cloud, Upstash

Temporal

medium burden

Durable workflow execution platform that persists workflow state and activity history, enabling long-running stateful processes (minutes to years) tha

Observability Requirements

Monitor queue backlog signals

Seed 'Queue Consumer Backlog' identifies 4 metrics relevant to queue_backlog_accumulation.

Seed 'Queue Consumer Backlog' identifies 4 metrics relevant to queue_backlog_accumulation.

Monitor generic risk probe signals

Seed 'Deadlock Risk Probe' identifies 2 metrics relevant to deadlock.

Seed 'Deadlock Risk Probe' identifies 2 metrics relevant to deadlock.

Track Queue Backlog Accumulation exposure

Queue Backlog Accumulation has high exposure and affects 2 components. Affects 2 nodes. (Event Streaming, Slow Consumer)

Queue Backlog Accumulation has high exposure and affects 2 components. Affects 2 nodes. (Event Streaming, Slow Consumer)

Track Deadlock exposure

Deadlock has high exposure and affects 1 component. Affects 1 node. (PostgreSQL)

Deadlock has high exposure and affects 1 component. Affects 1 node. (PostgreSQL)

Track Lock Contention exposure

Lock Contention has high exposure and affects 1 component. Affects 1 node. (Write-Heavy Transactional)

Lock Contention has high exposure and affects 1 component. Affects 1 node. (Write-Heavy Transactional)

Worker idle rate > 20% despite queue depth > 10k pending jobs; PostgreSQL pg_locks showing wait events on job table inde

This signal indicates the architecture is approaching 'Tier 1: Job Claim Lock Contention'. Likely bottleneck: Missing or misconfigured partial index on the job claim query; high worker concurrency driving SELECT FOR UPDATE SKIP LOCKED contention on a narrow hot page.

Tier 1: Job Claim Lock Contention

High-priority job queue depth growing despite workers available; low-priority batch jobs showing high throughput while t

This signal indicates the architecture is approaching 'Tier 2: Priority Inversion Under Load'. Likely bottleneck: Single worker pool consuming from all priority queues with equal weight; no priority-weighted polling implementation.

Tier 2: Priority Inversion Under Load

Temporal workflow worker memory usage growing with age of oldest active workflow; workflow replay time (on worker restar

This signal indicates the architecture is approaching 'Tier 3: Temporal Workflow History Size'. Likely bottleneck: Long-running workflows accumulating history beyond Temporal's efficient replay range; workflows that wait on external signals for extended periods accumulate heartbeat and timer events.

Tier 3: Temporal Workflow History Size

Readiness Action Plan

Criticalteam

Satisfy: Team at 'experienced backend team' maturity level

Effort: 1–4 weeks depending on current state · Unblocks: Adoption of Distributed Job Queue Platform

Criticalprocess

Satisfy: Failure mode awareness and runbooks

Effort: 1–4 weeks depending on current state · Unblocks: Adoption of Distributed Job Queue Platform

Criticalmonitoring

Satisfy: Production-grade observability stack

Effort: 1–4 weeks depending on current state · Unblocks: Adoption of Distributed Job Queue Platform

Criticalinfrastructure

Satisfy: Mitigation for 4 high-risk topology node(s)

Effort: 1–4 weeks depending on current state · Unblocks: Adoption of Distributed Job Queue Platform

Highmonitoring

Instrument all critical path components with metrics and alerting

Effort: 1–2 weeks · Unblocks: Safe production adoption and incident response

Highprocess

Validate adoption in a staging environment before production

Effort: 2–4 weeks for thorough staging validation · Unblocks: Production confidence and rollback preparedness

Mediuminfrastructure

Mitigate risk: Queue Backlog Accumulation

Effort: 1–3 weeks · Unblocks: Reduces 'Queue Backlog Accumulation' from blocking adoption

Mediuminfrastructure

Mitigate risk: Deadlock

Effort: 1–3 weeks · Unblocks: Reduces 'Deadlock' from blocking adoption

Go Signals

  • Team has hands-on experience with all 4 referenced technologies.
  • All scenario failure modes have documented runbooks and alerting coverage.
  • A staging environment that mirrors production load has been tested successfully.

No-Go Signals

  • Team cannot explain or debug any of Distributed Job Queue Platform's documented failure modes.
  • No observability baseline exists for the critical components.
  • Top risk is unmitigated: 'Queue Backlog Accumulation', do not proceed without addressing this.

Team Requirements

Apache Kafka operations

Required level: proficient

Team can explain Apache Kafka's failure modes, tune configuration parameters under load, and recover from common operational issues.

PostgreSQL operations

Required level: proficient

Team can explain PostgreSQL's failure modes, tune configuration parameters under load, and recover from common operational issues.

Redis operations

Required level: proficient

Team can explain Redis's failure modes, tune configuration parameters under load, and recover from common operational issues.

Temporal operations

Required level: proficient

Team can explain Temporal's failure modes, tune configuration parameters under load, and recover from common operational issues.

Readiness assessment is derived from structured scenario and topology knowledge. It provides an evidence-grounded baseline, not a substitute for an actual team capability review or infrastructure audit. Validate each item against your specific environment.

Architectural Tradeoffs

2

Recommendations

12
High

Monitor: Queue Backlog Accumulation

risk_monitoring

Message queue or event stream consumer processing rate falls below producer write rate, causing consumer lag to grow unboundedly: eventually leading to increased end-to-end latency, producer backpressure, data expiry, or queue resource exhaustion.

Affects 2 nodes. (Event Streaming, Slow Consumer)

High

Monitor: Deadlock

risk_monitoring

Two or more transactions each hold a lock the other needs, forming a cycle in the lock wait-for graph that no participant can escape on its own. The database breaks the cycle by aborting one transaction, surfacing a serialization-class error the application must catch and retry. Under sustained contention, naive immediate retries re-enter the same cycle and amplify it into a retry storm.

Affects 1 node. (PostgreSQL)

High

Implement: Monitor queue backlog signals

observability

Seed 'Queue Consumer Backlog' identifies 4 metrics relevant to queue_backlog_accumulation.

Metrics to instrument: queue_depth, consumer_lag_seconds, consumer_throughput

Moderate

In-process job execution (synchronous, within the same application process) → PostgreSQL-backed distributed job queue with Redis visibility leasing

migration_planning

Trigger: Background jobs competing with user-facing API requests for application server resources (CPU, memory, thread pool); a long-running job blocking the application process for minutes; need for job retry on failure without application restart; need to scale job execution independently from the API request handling capacity. Migrate from 'In-process job execution (synchronous, within the same application process)' to 'PostgreSQL-backed distributed job queue with Redis visibility leasing'. Identify and categorize all in-process jobs by idempotency before migration begins. Migrate idempotent jobs first (image resizing, report generation, email send). Build the dead-letter queue, retry policy, and monitoring before migrating non-idempotent jobs. Never migrate financial or state-mutation jobs to the async path until idempotency is verified and load-tested.

The transition from synchronous to async execution means the caller no longer has a direct result from the job operation; all callers that block on synchronous job results must be refactored to poll a job status endpoint or receive a callback; The first version of the distributed job queue must implement visibility leasing and idempotent job operations before any non-idempotent jobs are migrated to the async path: migrating a non-idempotent job before leasing is implemented guarantees duplicate execution during worker failures

Moderate

Single-worker-pool job queue (all jobs processed by one pool) → Priority-separated worker pools with dedicated transactional and batch pools

migration_planning

Trigger: High-priority transactional jobs (e.g., payment processing, user account operations) delayed by low-priority batch jobs (e.g., report generation, data export) consuming all worker capacity; job execution latency SLA differentiated by job type but not enforceable with a single worker pool; need to independently autoscale high-priority workers without scaling batch workers. Migrate from 'Single-worker-pool job queue (all jobs processed by one pool)' to 'Priority-separated worker pools with dedicated transactional and batch pools'. Start with two pools: one for high-priority (all transactional jobs), one for low-priority (all batch jobs). Add more priority tiers only if the two-tier model proves insufficient. Each pool has its own job table query (filtered by priority tier), its own autoscale policy, and its own SLA dashboard. The job type-to-pool mapping is maintained as application configuration, not database metadata.

Separate worker pools require separate monitoring and autoscaling configuration; doubling the operational surface requires commensurate monitoring investment before the separation is made; If a job is mis-classified (transactional job enqueued as batch), it enters the wrong queue and violates its own SLA silently; job priority classification must be enforced at enqueue time with validation, not as a convention

Moderate

Prepare runbook for: Burst Traffic Cold Cache Stampede

simulation_preparedness

Simulation demonstrates critical degradation of redis, postgresql

Without a runbook, recovery from this failure mode will be ad-hoc

Moderate

Prepare runbook for: Connection Pool Exhaustion with Horizontal User Scale

simulation_preparedness

Simulation demonstrates critical degradation of postgresql

Without a runbook, recovery from this failure mode will be ad-hoc

Moderate

Plan evolution: OLTP Analytics Queries → OLTP + OLAP Separation

evolution_planning

Evolution from Unified OLTP + Analytics on PostgreSQL → Separated OLTP (PostgreSQL) + OLAP (ClickHouse/Snowflake)

Migration complexity: medium. Rollback: always.

Moderate

Plan evolution: Single Cache Layer → Distributed Cache

evolution_planning

Evolution from Single Redis Node / Sentinel Cluster → Distributed Redis Cluster (Consistent Hash Ring)

Migration complexity: medium. Rollback: complex.

Moderate

Cache-outage database fallback load

caching

'Distributed Job Queue Platform' includes a cache in its topology. If the cache becomes unavailable, the primary database receives the cache's full request load until the cache recovers.

Capacity-plan the primary database for this fallback load, not only for the steady-state cached load.

Moderate

Cache invalidation ownership

caching

Cache invalidation for Distributed Job Queue Platform is event-driven: kafka refreshes or invalidates redis. This couples cache freshness to consumer lag on that event stream, not to the primary write path directly.

If the event-stream consumer falls behind, the cache serves stale data until it catches up -- monitor consumer lag as a cache-freshness signal, not only a backlog signal.

Moderate

Retry without dead-letter ownership

messaging

Distributed Job Queue Platform carries retry_with_backoff for its event publication with no referenced dead_letter_queue. Exhausted retries need an explicit destination, or a permanently failing message either blocks the queue or is silently discarded.

Add a dead-letter path for exhausted retries, and monitor its depth as an active-incident signal, not just a static count.

Scaling Pressure Signals

8

Worker idle rate > 20% despite queue depth > 10k pending jobs; PostgreSQL pg_locks showing wait events on job table index; worker job claim p99 latency > 50ms (claim should be sub-10ms with correct indexing); CPU on PostgreSQL elevated from index scan overhead on job claim queries

Threshold

Tier 1: Job Claim Lock Contention

Likely Bottleneck

Missing or misconfigured partial index on the job claim query; high worker concurrency driving SELECT FOR UPDATE SKIP LOCKED contention on a narrow hot page

Recommended Evolution

Add a partial index on (priority DESC, created_at ASC) WHERE status = 'pending' AND run_at <= NOW(): the WHERE clause reduces the index to only claimable jobs, dramatically reducing index scan range; if contention persists, implement a job dispatch service (single dispatcher process) that batches claim queries and distributes job IDs to workers via an in-memory channel, removing per-worker database claims; tune FILLFACTOR on the job table to 70% to reduce hot page contention on SKIP LOCKED

Evidence:kafka-consumer-lag-cascadepartition-hotspot-amplification

High-priority job queue depth growing despite workers available; low-priority batch jobs showing high throughput while transactional job latency (time from enqueue to execution start) p95 > 30s; worker pool metrics showing workers claiming jobs uniformly across priority levels rather than draining the high- priority queue first

Threshold

Tier 2: Priority Inversion Under Load

Likely Bottleneck

Single worker pool consuming from all priority queues with equal weight; no priority-weighted polling implementation

Recommended Evolution

Separate worker pools per priority tier (e.g., dedicated transactional workers for high-priority jobs, shared workers for low-priority batch); or implement priority-weighted polling in a unified worker pool (poll high-priority queue N times before polling low-priority queue once, where N is the priority weight ratio); add high-priority job execution latency as a first-class SLA metric with alerting threshold separate from batch job latency

Evidence:kafka-consumer-lag-cascadepartition-hotspot-amplification

Temporal workflow worker memory usage growing with age of oldest active workflow; workflow replay time (on worker restart or task routing) > 5s for specific workflow types; Temporal UI showing workflow history event count > 10k for specific workflow instances; Temporal backing PostgreSQL storage growing disproportionately to active workflow count

Threshold

Tier 3: Temporal Workflow History Size

Likely Bottleneck

Long-running workflows accumulating history beyond Temporal's efficient replay range; workflows that wait on external signals for extended periods accumulate heartbeat and timer events

Recommended Evolution

Implement Continue-As-New in long-running Temporal workflows to reset workflow history at safe checkpoints (typically every 1000–2000 events); use workflow signals sparingly in loops: each signal creates a history event; for workflows waiting on external events for > 24 hours, implement a timer-based wakeup with Continue-As-New rather than an open-ended wait; add workflow history size monitoring as an operational metric

Evidence:kafka-consumer-lag-cascadepartition-hotspot-amplification

PostgreSQL job table row count > 500M (including completed jobs not yet archived); autovacuum running continuously on job table; completed job retention queries (SELECT ... WHERE completed_at < NOW() - INTERVAL '7 days' DELETE) taking > 60s; job history query latency (for admin/audit queries on completed jobs) > 5s; PostgreSQL storage cost for job table exceeding budget

Threshold

Tier 4: PostgreSQL Job Table Storage and Query Pressure

Likely Bottleneck

Job table accumulating completed job records without archival; autovacuum unable to keep pace with dead tuple accumulation from status transitions

Recommended Evolution

Partition the job table by created_at date range (weekly or monthly partitions); implement automated partition archival: move completed partitions to cold storage (S3 as Parquet, queryable via Trino/Athena) after a retention window; keep only current + previous partition hot in PostgreSQL; this replaces row-level DELETE with partition-level DETACH + COPY, which completes in seconds vs. minutes; add FILLFACTOR 70 to the job table to leave room for in-place updates of status transitions without creating dead tuples on every row

Worker idle rate > 20% despite queue depth > 10k pending jobs; PostgreSQL pg_locks showing wait events on job table index; worker job claim p99 latency > 50ms (claim should be sub-10ms with correct indexing); CPU on PostgreSQL elevated from index scan overhead on job claim queries

Threshold

Escalation trigger: Missing or misconfigured partial index on the job claim query; high worker concurrency driving SELECT FOR UPDATE SKIP LOCKED contention on a narrow hot page

Likely Bottleneck

Tier 1: Job Claim Lock Contention

Recommended Evolution

Monitor: queue_depth, consumer_lag_seconds, consumer_throughput

High-priority job queue depth growing despite workers available; low-priority batch jobs showing high throughput while transactional job latency (time from enqueue to execution start) p95 > 30s; worker pool metrics showing workers claiming jobs uniformly across priority levels rather than draining the high- priority queue first

Threshold

Escalation trigger: Single worker pool consuming from all priority queues with equal weight; no priority-weighted polling implementation

Likely Bottleneck

Tier 2: Priority Inversion Under Load

Recommended Evolution

Monitor: queue_depth, consumer_lag_seconds, consumer_throughput

Temporal workflow worker memory usage growing with age of oldest active workflow; workflow replay time (on worker restart or task routing) > 5s for specific workflow types; Temporal UI showing workflow history event count > 10k for specific workflow instances; Temporal backing PostgreSQL storage growing disproportionately to active workflow count

Threshold

Escalation trigger: Long-running workflows accumulating history beyond Temporal's efficient replay range; workflows that wait on external signals for extended periods accumulate heartbeat and timer events

Likely Bottleneck

Tier 3: Temporal Workflow History Size

Recommended Evolution

Monitor: queue_depth, consumer_lag_seconds, consumer_throughput

PostgreSQL job table row count > 500M (including completed jobs not yet archived); autovacuum running continuously on job table; completed job retention queries (SELECT ... WHERE completed_at < NOW() - INTERVAL '7 days' DELETE) taking > 60s; job history query latency (for admin/audit queries on completed jobs) > 5s; PostgreSQL storage cost for job table exceeding budget

Threshold

Escalation trigger: Job table accumulating completed job records without archival; autovacuum unable to keep pace with dead tuple accumulation from status transitions

Likely Bottleneck

Tier 4: PostgreSQL Job Table Storage and Query Pressure

Recommended Evolution

Monitor: queue_depth, consumer_lag_seconds, consumer_throughput

Migration Readiness

12

Migration Stages

3
Stage

In-process job execution (synchronous, within the same application process) → PostgreSQL-backed distributed job queue with Redis visibility leasing

info

Migration trigger: Background jobs competing with user-facing API requests for application server resources (CPU, memory, thread pool); a long-running job blocking the application process for minutes; need for job retry on failure without application restart; need to scale job execution independently from the API request handling capacity

Stage

Single-worker-pool job queue (all jobs processed by one pool) → Priority-separated worker pools with dedicated transactional and batch pools

info

Migration trigger: High-priority transactional jobs (e.g., payment processing, user account operations) delayed by low-priority batch jobs (e.g., report generation, data export) consuming all worker capacity; job execution latency SLA differentiated by job type but not enforceable with a single worker pool; need to independently autoscale high-priority workers without scaling batch workers

Stage

Simple job queue with single-step job execution → Temporal-orchestrated multi-step workflows for complex job pipelines

info

Migration trigger: Multi-step jobs (e.g., ingest file → validate → transform → load → notify → archive) failing at step 3 and restarting from step 1 on retry, causing duplicate work and incorrect intermediate state; step failure debugging requiring full job log analysis with no visibility into individual step state; need to pause and resume long-running workflows based on external events (user approval, payment confirmation)

!

Risks

9
Risk

The transition from synchronous to async execution means the

warning

The transition from synchronous to async execution means the caller no longer has a direct result from the job operation; all callers that block on synchronous job results must be refactored to poll a job status endpoint or receive a callback

Risk

The first version of the distributed job queue must implemen

warning

The first version of the distributed job queue must implement visibility leasing and idempotent job operations before any non-idempotent jobs are migrated to the async path: migrating a non-idempotent job before leasing is implemented guarantees duplicate execution during worker failures

Risk

Separate worker pools require separate monitoring and autosc

warning

Separate worker pools require separate monitoring and autoscaling configuration; doubling the operational surface requires commensurate monitoring investment before the separation is made

Risk

If a job is mis-classified (transactional job enqueued as ba

warning

If a job is mis-classified (transactional job enqueued as batch), it enters the wrong queue and violates its own SLA silently; job priority classification must be enforced at enqueue time with validation, not as a convention

Risk

Temporal introduces a new operational dependency (Temporal s

warning

Temporal introduces a new operational dependency (Temporal server + its own PostgreSQL) before any workflow is deployed; the organization must be willing to operate Temporal as a production service, not just add it as a library

Risk

Existing single-step jobs that work correctly should not be

warning

Existing single-step jobs that work correctly should not be migrated to Temporal; the added complexity of Temporal workflow semantics is only justified for genuinely multi-step workflows with external dependencies or long wait times

Risk

Projection lag creates a read-after-write window where users

critical

Projection lag creates a read-after-write window where users see stale data after their own writes. Mitigation: Route immediate post-write reads to the write store (session-scoped write token); accept eventual consistency only for non-user-initiated reads

direct-db-to-cqrs
Risk

Projection rebuild after schema change can take hours or day

critical

Projection rebuild after schema change can take hours or days on large datasets. Mitigation: Design blue/green projection deployment: build new projection in parallel before switching traffic; test rebuild time in staging

direct-db-to-cqrs
Risk

Cross-service workflows that previously used database transa

critical

Cross-service workflows that previously used database transactions now require Saga orchestration. Mitigation: Design idempotent event handlers; implement compensating transactions for every multi-step workflow; test failure injection in staging

modular-monolith-to-event-driven

Review Sections

6

Referenced Intelligence

Architecture Review: Distributed Job Queue Platform: DBRaven