| Job Producer | Owns one bounded domain decision, transition, or operational capability. In this design it participates in: Persist the definition and expand only the next bounded recurrence horizon. | Separates a distinct scale, ownership, policy, or failure boundary. It prevents the external caller from also owning the contract and failure behavior of Scheduler API. | Keep this behavior inside an adjacent service. Prefer that simpler option until independent scale, ownership, policy, or failure isolation is measurable. Here that simpler choice would couple “Scheduler leader dies after enqueue” to the external caller. | Costs an interface, deployment, telemetry, ownership, and failure mode. Keep it in-process first; extract when independent scale or reliability pays for the boundary. Measure the latency, saturation, lag, or mismatch at the Job Producer boundary before extracting or scaling it. |
| Scheduler API | Owns authentication, validation, quotas, deadlines, and routing. In this design it participates in: Shard by job ID and load near-future due times into a timing wheel. | Separates a distinct scale, ownership, policy, or failure boundary. It prevents Job Producer from also owning the contract and failure behavior of Job Definition DB. | Put protocol, authentication, quotas, and business transitions in one process. Acceptable at low scale, but it couples external traffic risk to domain releases. Here that simpler choice would couple “Clock jump advances or delays buckets” to Job Producer. | Costs another hop, policy distribution, and a high-blast-radius fleet. Introduce it when many clients or services need one protocol and protection boundary. Measure the latency, saturation, lag, or mismatch at the Scheduler API boundary before extracting or scaling it. |
| Job Definition DB | Owns authoritative versioned state or immutable evidence. In this design it participates in: At due time create one execution identity, claim a lease, and enqueue by priority. | Defines the source of truth and commit boundary. It prevents Scheduler API from also owning the contract and failure behavior of Timing Wheel. | Let each service persist its own interpretation. That removes one clear commit boundary and makes retries, support, and reconciliation ambiguous. Here that simpler choice would couple “Long job loses lease during GC pause” to Scheduler API. | Costs schema migration, replication, backup, and shard ownership. Split storage only when access patterns, retention, or compliance boundaries materially differ. Measure the latency, saturation, lag, or mismatch at the Job Definition DB boundary before extracting or scaling it. |
| Timing Wheel | Owns one bounded domain decision, transition, or operational capability. In this design it participates in: Workers heartbeat, execute idempotently, then conditionally mark success or retry. | Separates a distinct scale, ownership, policy, or failure boundary. It prevents Job Definition DB from also owning the contract and failure behavior of Due-Time Index. | Keep this behavior inside an adjacent service. Prefer that simpler option until independent scale, ownership, policy, or failure isolation is measurable. Here that simpler choice would couple “Cron expansion creates duplicate occurrence” to Job Definition DB. | Costs an interface, deployment, telemetry, ownership, and failure mode. Keep it in-process first; extract when independent scale or reliability pays for the boundary. Measure the latency, saturation, lag, or mismatch at the Timing Wheel boundary before extracting or scaling it. |
| Due-Time Index | Serves a low-latency, disposable projection with authoritative fallback. In this design it participates in: Expired leases requeue the same execution identity; DLQ preserves terminal failures. | Separates a distinct scale, ownership, policy, or failure boundary. It prevents Timing Wheel from also owning the contract and failure behavior of Shard Leader. | Read authoritative storage for every request. Simpler initially, but latency and source-of-truth load scale together and a hot key becomes a database incident. Here that simpler choice would couple “Priority tenant starves background work” to Timing Wheel. | Costs invalidation, staleness, stampede protection, and memory. Add or split it only after the workload (1B scheduled jobs · 1M due/min · seconds-level precision) proves repeated reads dominate. Measure the latency, saturation, lag, or mismatch at the Due-Time Index boundary before extracting or scaling it. |
| Shard Leader | Owns one bounded domain decision, transition, or operational capability. In this design it participates in: Persist the definition and expand only the next bounded recurrence horizon. | Separates a distinct scale, ownership, policy, or failure boundary. It prevents Due-Time Index from also owning the contract and failure behavior of Lease / Claim Store. | Keep this behavior inside an adjacent service. Prefer that simpler option until independent scale, ownership, policy, or failure isolation is measurable. Here that simpler choice would couple “Scheduler leader dies after enqueue” to Due-Time Index. | Costs an interface, deployment, telemetry, ownership, and failure mode. Keep it in-process first; extract when independent scale or reliability pays for the boundary. Measure the latency, saturation, lag, or mismatch at the Shard Leader boundary before extracting or scaling it. |
| Lease / Claim Store | Owns authoritative versioned state or immutable evidence. In this design it participates in: Shard by job ID and load near-future due times into a timing wheel. | Defines the source of truth and commit boundary. It prevents Shard Leader from also owning the contract and failure behavior of Dispatch Queue. | Let each service persist its own interpretation. That removes one clear commit boundary and makes retries, support, and reconciliation ambiguous. Here that simpler choice would couple “Clock jump advances or delays buckets” to Shard Leader. | Costs schema migration, replication, backup, and shard ownership. Split storage only when access patterns, retention, or compliance boundaries materially differ. Measure the latency, saturation, lag, or mismatch at the Lease / Claim Store boundary before extracting or scaling it. |
| Dispatch Queue | Preserves durable ordering, replay, and consumer checkpoints. In this design it participates in: At due time create one execution identity, claim a lease, and enqueue by priority. | Decouples bursts and failure from user acknowledgment. It prevents Lease / Claim Store from also owning the contract and failure behavior of Priority Router. | Call every downstream consumer synchronously. That couples user latency and availability to analytics, notification, indexing, and audit dependencies. Here that simpler choice would couple “Long job loses lease during GC pause” to Lease / Claim Store. | Costs eventual consistency, schema evolution, replay tooling, idempotent consumers, and lag operations. Earn it when bursts or downstream failure must not block acknowledgment. Measure the latency, saturation, lag, or mismatch at the Dispatch Queue boundary before extracting or scaling it. |
| Priority Router | Owns one bounded domain decision, transition, or operational capability. In this design it participates in: Workers heartbeat, execute idempotently, then conditionally mark success or retry. | Separates a distinct scale, ownership, policy, or failure boundary. It prevents Dispatch Queue from also owning the contract and failure behavior of Worker Pool. | Keep this behavior inside an adjacent service. Prefer that simpler option until independent scale, ownership, policy, or failure isolation is measurable. Here that simpler choice would couple “Cron expansion creates duplicate occurrence” to Dispatch Queue. | Costs an interface, deployment, telemetry, ownership, and failure mode. Keep it in-process first; extract when independent scale or reliability pays for the boundary. Measure the latency, saturation, lag, or mismatch at the Priority Router boundary before extracting or scaling it. |
| Worker Pool | Executes idempotent asynchronous work under lease and retry policy. In this design it participates in: Expired leases requeue the same execution identity; DLQ preserves terminal failures. | Separates a distinct scale, ownership, policy, or failure boundary. It prevents Priority Router from also owning the contract and failure behavior of Execution Heartbeats. | Perform the work before acknowledging the caller. This gives simpler consistency but unbounded tail latency and fragile retries. Here that simpler choice would couple “Priority tenant starves background work” to Priority Router. | Costs leases, checkpoints, retries, DLQs, and lag operations. Separate once execution time or burstiness no longer fits the request deadline. Measure the latency, saturation, lag, or mismatch at the Worker Pool boundary before extracting or scaling it. |
| Execution Heartbeats | Owns one bounded domain decision, transition, or operational capability. In this design it participates in: Persist the definition and expand only the next bounded recurrence horizon. | Separates a distinct scale, ownership, policy, or failure boundary. It prevents Worker Pool from also owning the contract and failure behavior of Retry / DLQ. | Keep this behavior inside an adjacent service. Prefer that simpler option until independent scale, ownership, policy, or failure isolation is measurable. Here that simpler choice would couple “Scheduler leader dies after enqueue” to Worker Pool. | Costs an interface, deployment, telemetry, ownership, and failure mode. Keep it in-process first; extract when independent scale or reliability pays for the boundary. Measure the latency, saturation, lag, or mismatch at the Execution Heartbeats boundary before extracting or scaling it. |
| Retry / DLQ | Owns one bounded domain decision, transition, or operational capability. In this design it participates in: Shard by job ID and load near-future due times into a timing wheel. | Separates a distinct scale, ownership, policy, or failure boundary. It prevents Execution Heartbeats from also owning the contract and failure behavior of Cron Expander. | Keep this behavior inside an adjacent service. Prefer that simpler option until independent scale, ownership, policy, or failure isolation is measurable. Here that simpler choice would couple “Clock jump advances or delays buckets” to Execution Heartbeats. | Costs an interface, deployment, telemetry, ownership, and failure mode. Keep it in-process first; extract when independent scale or reliability pays for the boundary. Measure the latency, saturation, lag, or mismatch at the Retry / DLQ boundary before extracting or scaling it. |
| Cron Expander | Owns one bounded domain decision, transition, or operational capability. In this design it participates in: At due time create one execution identity, claim a lease, and enqueue by priority. | Separates a distinct scale, ownership, policy, or failure boundary. It prevents Retry / DLQ from also owning the contract and failure behavior of History / Audit. | Keep this behavior inside an adjacent service. Prefer that simpler option until independent scale, ownership, policy, or failure isolation is measurable. Here that simpler choice would couple “Long job loses lease during GC pause” to Retry / DLQ. | Costs an interface, deployment, telemetry, ownership, and failure mode. Keep it in-process first; extract when independent scale or reliability pays for the boundary. Measure the latency, saturation, lag, or mismatch at the Cron Expander boundary before extracting or scaling it. |
| History / Audit | Owns one bounded domain decision, transition, or operational capability. In this design it participates in: Workers heartbeat, execute idempotently, then conditionally mark success or retry. | Proves correctness and supports controlled recovery. It prevents Cron Expander from also owning the contract and failure behavior of operators and repair tooling. | Infer correctness from request logs. Logs do not prove durable business state, detect silent drift, or safely repair ambiguous outcomes. Here that simpler choice would couple “Cron expansion creates duplicate occurrence” to Cron Expander. | Costs an interface, deployment, telemetry, ownership, and failure mode. Keep it in-process first; extract when independent scale or reliability pays for the boundary. Measure the latency, saturation, lag, or mismatch at the History / Audit boundary before extracting or scaling it. |