PromptBase
PromptBase SelectGet Select
Close icon
General
Home
Marketplace
Create
Hire
Login
Chat
Sell
Explore

Prompt Details

Model
(claude-5-sonnet)
Token size
2,309
Example input
[decision]: Migrate from monolithic PostgreSQL database to a service-per-database model [system_context]: E-commerce platform handling 50k orders/day, currently single shared DB [options_considered]: 1) Keep shared DB with stricter access controls, 2) Full databaseper-service split, 3) Hybrid with shared read replicas [constraints]: Must maintain 99.9% uptime during migration, team has limited DevOps bandwidth, 6-month timeline
Example output
# ADR: Adopt Phased Database-Per-Service Migration **Status:** Proposed **Date:** _{fill in}_ **Decision Makers:** _{fill in}_ --- ## Step 0 — Decision Classification & Risk Profile | Dimension | Classification | Rationale | |---|---|---| | Decision type | Architecture pattern | Data-ownership/topology change from shared to distributed DB (STATED) | | Reversibility | Costly to reverse | Once services own separate schemas, re-merging requires data reconciliation and downtime (INFERRED) | | Blast radius if wrong | System-wide | Every order-flow path (checkout, inventory, payments) touches the shared DB today; a bad cutover affects all of them (INFERRED) | | Decision urgency | Has a natural deadline | 6-month timeline is an explicit constraint (STATED) | | Stakeholder alignment | Partially aligned | Three competing options were presented with no stated sign-off on the trade-offs between them (INFERRED) | **Failure mode priority map:** | Failure Mode | Priority | Evidence Type | Conf | |---|---|---|---| | Decision made without stating the problem it solves | MED | INFERRED | 55 | | Options compared on different criteria | HIGH | INFERRED | 70 | | Constraints not made explicit | LOW | STATED | 85 | | Consequences not mapped | HIGH | INFERRED | 65 | | No revisit trigger defined | MED | INFERRED | 60 | --- ## Context & Problem Statement **System background:** The platform is an e-commerce system processing 50,000 orders/day (STATED) against a single shared PostgreSQL database (STATED). This implies multiple application services or modules currently read and write against one schema, with no enforced ownership boundaries (INFERRED). **The forcing function:** No explicit trigger was stated. The most likely drivers, based on the options under consideration, are growing write contention at current order volume, cross-team deployment coupling, and single-point-of-failure risk concentrated in one database (INFERRED). **Problem statement:** A single shared database couples all services to one schema, one failure domain, and one scaling ceiling, preventing teams from deploying, scaling, or recovering independently as order volume grows. **Stakeholders affected:** Service-owning engineering teams (checkout, inventory, payments) gain or lose autonomy depending on the option chosen (INFERRED); the DevOps/platform team absorbs most of the execution load under a fixed, limited-bandwidth constraint (STATED); customers are exposed to any uptime risk during migration (STATED via the 99.9% SLA); leadership owns the timeline risk (STATED). **Assumption ledger:** | Assumption | Where It Enters | If False — Effect on the Decision | |---|---|---| | The shared DB is the primary source of coupling/scaling pain | Problem statement | Migration solves the wrong problem; effort is wasted (INFERRED) | | Order volume will keep growing, justifying independent scaling | Criteria weighting | Full split may be over-engineering for current load (INFERRED) | | Team has sufficient distributed-data expertise for a split | Feasibility of Option B | Limited DevOps bandwidth becomes a hard blocker, not just a friction cost (STATED constraint) | | 99.9% uptime must hold continuously through migration, not just at cutover | Constraints | A scheduled maintenance-window approach becomes viable instead (STATED) | | 6 months is enough for a full split without freezing feature work | Timeline constraint | A phased/hybrid approach becomes mandatory rather than optional (INFERRED) | ⚠ **Silent corruption flag:** The problem statement assumes the *database* is the coupling bottleneck. If the real coupling is at the application layer (synchronous service-to-service calls, shared libraries), splitting the database alone will not resolve the underlying issue — the decision would then be solving the wrong layer of the stack. --- ## Options Analysis **Evaluation criteria** (derived from stated constraints and system context): | Criterion | Weight | Rationale | Evidence Type | |---|---|---|---| | Migration/uptime risk | 30% | Direct tie to 99.9% SLA constraint | STATED | | Effort vs. available DevOps bandwidth | 25% | Bandwidth explicitly called out as limited | STATED | | Timeline feasibility | 20% | 6-month hard deadline | STATED | | Service autonomy / decoupling gained | 15% | Underlying motive inferred from options offered | INFERRED | | Long-term scalability | 10% | Growth trajectory implied, not quantified | INFERRED | **Options comparison:** | Criterion | A: Shared DB + stricter access controls | B: Full database-per-service split | C: Hybrid with shared read replicas | |---|---|---|---| | Migration/uptime risk | Lowest — permissions-only change, no data movement | Highest — live data migration and cutover across every service | Moderate — reads decoupled first, writes stay centralized | | Effort vs. bandwidth | Low — IAM/role config fits current team | High — likely exceeds available DevOps capacity | Medium — replica ops load, no full re-architecture | | Timeline feasibility | Comfortably fits 6 months | Unlikely to complete in 6 months at current bandwidth | Fits 6 months as a first phase | | Service autonomy gained | Minimal — schema and blast radius still shared | Highest — full ownership, independent scaling | Partial — read scaling only, writes still coupled | | Long-term scalability | Limited — write contention persists as volume grows | Best — each service scales independently | Good for reads; write bottleneck deferred, not solved | - **Option A** — Benefits most: DevOps/platform team (lowest new operational load). Makes harder: enforcing real service boundaries and independent deploys. Evidence: INFERRED. - **Option B** — Benefits most: individual service-owning teams (full autonomy). Makes harder: cross-service transactions and ad-hoc reporting queries. Evidence: INFERRED. - **Option C** — Benefits most: read-heavy services (catalog, order history, search). Makes harder: write-path scaling — defers full decoupling rather than achieving it. Evidence: INFERRED. --- ## Decision & Rationale **DECISION:** Migrate to a full database-per-service architecture (Option B), executed as a phased, risk-ranked rollout rather than a single system-wide cutover. **Rationale:** Option B scores highest on service autonomy and long-term scalability, the two criteria that address the root problem named in the Problem Statement — coupling and shared scaling ceiling. However, it also scores worst on migration/uptime risk and bandwidth fit, both weighted heavily (55% combined) because of Constraint C1 (99.9% uptime) and Constraint C2 (limited DevOps bandwidth). A single-cutover full split would very likely breach both constraints. Sequencing the split by service risk and write volume — rather than migrating everything at once — lets the highest-value, lowest-risk services move first within the 6-month window, while keeping lower-priority services on the shared DB (functionally similar to Option A in the interim) until capacity allows. This accepts a longer full-completion timeline than 6 months as a known trade-off rather than forcing a risky big-bang migration to hit the deadline. **Rejected options summary:** | Option | Primary Rejection Reason | Evidence Type | |---|---|---| | A: Shared DB + stricter access controls | Does not address the coupling/scaling problem — only delays it, functions as a stopgap, not an end state | INFERRED | | C: Hybrid with read replicas | Solves read scaling but leaves write-path coupling — the harder half of the problem — unresolved as a final architecture | INFERRED | --- ## Consequence Mapping | Consequence | Type | Timeframe | Affected Component | Severity | Evidence Type | |---|---|---|---|---|---| | Independent scaling for high-traffic services (e.g., inventory during sales spikes) | Positive | Long | Inventory/Order services | 🟢 | INFERRED | | Reduced blast radius — one service's DB issue no longer takes down the whole platform | Positive | Long | Platform-wide | 🟢 | INFERRED | | Faster, independent deploys once schema ownership is clear | Positive | Medium | Engineering teams | 🟢 | INFERRED | | Loss of cross-service ACID transactions; must adopt sagas/eventual consistency | Negative/Accepted | Immediate–Long | Order/Inventory | 🔴 | INFERRED | | Increased operational load — more databases to monitor, patch, back up | Negative/Accepted | Immediate | DevOps/platform | 🔴 | INFERRED | | Cross-service reporting/analytics queries lose simple JOIN access | Negative/Accepted | Short | Data/BI | 🟡 | INFERRED | | Cutover windows may breach the 99.9% uptime SLA if poorly sequenced | Risk | Immediate–Short | Checkout/Payments | 🔴 | INFERRED | | 6-month timeline may be insufficient given bandwidth, leaving the migration partially complete | Risk | Short–Medium | Whole program | 🔴 | INFERRED | **Input robustness:** | Condition | Effect on Decision | Revisit Trigger | |---|---|---| | System scale increases 10x | Strengthens case for full split; raises urgency on remaining services | Sustained order volume above ~200k/day | | Key constraint changes (SLA relaxed or DevOps team grows) | Enables faster, less-phased execution | DevOps headcount increase or SLA renegotiation | | Team composition changes significantly | Expertise assumption in ledger may fail; migration could stall | Loss of key platform engineers, or inability to backfill by Month 2 | --- ## Implementation Guidance - **First 3 actions:** 1. Rank services by write volume, coupling, and blast radius to set the migration sequence. 2. Introduce logical schema ownership boundaries inside the existing shared DB before any physical separation, to de-risk the eventual cutover. 3. Build and test a data-sync mechanism (e.g., CDC-based dual-write) on the first, lowest-risk service, with a rehearsed rollback path in staging. - **Known migration risks:** dual-write inconsistency causing order/inventory mismatches; latency spikes during cutover windows; increased cross-service query latency mid-transition; DevOps overload delaying unrelated platform work. - **Definition of done:** every prioritized service reads/writes only its own database, no service accesses another's DB directly (API/event access only), per-database monitoring and alerting is in place, and no uptime incident during the program is attributable to the migration. - **Revisit trigger:** at the 3-month checkpoint, if fewer than 50% of prioritized services have completed migration, or any uptime incident is attributable to the migration, re-evaluate the plan — including falling back to the hybrid model (Option C) as the permanent end state for lower-priority services. --- ## ADR Integrity Check | Check | Status | Note | |---|---|---| | Problem statement is exactly one sentence and names a problem, not a solution | ✅ | Confirmed in Step 1 | | All options are compared on the same criteria | ✅ | 5 shared criteria applied to all 3 options | | Rejected options have a specific, non-generic rejection reason | ✅ | Each tied to a named unresolved trade-off | | Consequences include at least 2 negative/accepted trade-offs | ✅ | 3 negative/accepted + 2 risks listed | | A revisit trigger is defined | ✅ | 3-month checkpoint with explicit conditions | | All INFERRED findings are labeled | ✅ | Labeled throughout | **ADR CONFIDENCE: 60/100** — the direction (full split) is well-supported by the criteria, but the forcing function and stakeholder alignment were never stated, so the "why now" and organizational buy-in remain assumptions. **Biggest unknown:** whether actual DevOps capacity and distributed-data expertise can support even a phased split within 6 months without risking the 99.9% uptime SLA — this was never stated and is the single largest driver of execution risk in this decision.
Claude

Architecture Decision Record Writer

Add to Cart
PromptBase Select
Get this prompt + 9 more with Select$14 your first month, then $19/mo$14 first month, then $19/mo
View Select
Instant accessInstant access
Usage rightsCommercial use
Money-back guaranteeMoney‑back
By purchasing this prompt, you agree to our terms of service
CLAUDE-5-SONNET
Tested icon
Guide icon
4 examples icon
Free credits icon
📝Generate a complete, publication-readyArchitecture Decision Record — the kind senior engineers actually want to read. Classifies the decision's reversibility and blast radius, maps failure modes specific to your decision type, and produces a full trade-off analysis across every option considered. Includes an assumption ledger, constraintcollision table, and a revisit trigger so the decision doesn't silently become permanent. STATED/INFERRED tagging throughout, nothing summarized.🏛️
...more
Added over 1 month ago
Report
Browse Marketplace