Prompt Details
Model
(claude-4-5-sonnet)
Token size
512
Example input
[SYSTEM_OVERVIEW]: Internal workflow platform supporting finance and HR approvals across regions.
[ARCHITECTURE]: Microservices with shared PostgreSQL database, REST APIs, message queue for async tasks.
[CONSTRAINTS]: High availability, auditability, strict access control, moderate latency tolerance.
[RISKS]: Database contention, unclear service ownership, audit log consistency.
Example output
# ENTERPRISE ARCHITECTURE REVIEW
## 1. ARCHITECTURE ASSESSMENT
**Overall Structure: MODERATE CONCERN**
The shared PostgreSQL database across microservices creates a **distributed monolith anti-pattern**. Services may be independently deployable but remain tightly coupled through schema dependencies, transaction boundaries, and potential table contention. This undermines the core benefits of microservices architecture.
**Component Boundaries:** Unclear. Without explicit service ownership demarcation, multiple services may directly manipulate the same tables, creating hidden dependencies and making schema evolution extremely difficult. Risk of conflicting business logic and data ownership ambiguity.
**Single Points of Failure:**
- Shared database represents both a technical and operational SPOF
- Message queue architecture unspecified (clustering, durability guarantees unknown)
- REST API gateway/load balancing strategy not defined
**Suitability for Enterprise Scale:** Questionable. The architecture works for low-to-moderate scale but will create significant operational friction as the system grows. Cross-regional deployments compound the shared database problem.
---
## 2. SCALABILITY & RELIABILITY
**Load Behavior:** The shared database will become the primary bottleneck. As finance and HR workloads spike (month-end, annual reviews, benefits enrollment), contention will degrade performance across all services simultaneously. No read/write separation or caching layer mentioned.
**Critical Bottlenecks:**
- Database connection pool exhaustion under concurrent approval workflows
- Lock contention on shared audit tables during high-volume periods
- Unclear how message queue handles backpressure during async task spikes
**Resilience Gaps:**
- No indication of database replication, failover strategy, or backup RPO/RTO
- Service-level circuit breakers, retry policies, and degradation strategies unspecified
- Message queue failure modes undefined (dead letter queues, message durability)
**Fault Tolerance:** Insufficient. A database outage impacts all services. No mention of regional failover capabilities despite "across regions" requirement.
**Scalability Confidence: 3/10**
The architecture can handle modest growth but will require significant rework before enterprise-scale demands materialize.
---
## 3. DATA & INTEGRATION REVIEW
**Data Flow:** High risk of inconsistent state. With multiple services writing to shared tables and async processing via message queue, eventual consistency boundaries are undefined. Unclear how multi-step approval workflows maintain transactional integrity.
**Data Ownership:** Critical gap. Without clear service ownership of database entities, competing writes and schema changes will create production incidents. The shared database pattern invites services to bypass APIs and query directly, violating encapsulation.
**Consistency Risks:**
- Audit logs written by multiple services may have ordering/completeness issues
- Approval state changes coordinated across services without distributed transaction management
- Message queue failures could leave workflows in inconsistent states with no compensating transactions
**Integration Patterns:** REST APIs suggest synchronous service-to-service calls, increasing latency and creating cascading failure risks. No mention of API versioning, backward compatibility strategy, or contract testing.
**External Dependencies:** Unspecified. If finance/HR systems integrate externally (payroll, compliance systems), failure modes and data synchronization strategies are undefined.
---
## 4. SECURITY & COMPLIANCE CONSIDERATIONS
**High-Level Security Risks:**
- Shared database with multiple service accounts increases credential exposure surface
- REST API authentication/authorization model not described (service-to-service vs. user context propagation)
- Cross-regional data residency requirements unaddressed for EU/APAC employees
**Trust Boundaries:** Blurred. If services share database credentials, any compromised service can access all data. No mention of:
- Row-level security or tenant isolation mechanisms
- Encryption at rest/in transit
- Secrets management strategy
**Compliance-Sensitive Areas:**
- **Audit log immutability:** Critical for SOX/SOC2. Current design risks audit tampering if multiple services write to shared audit tables
- **Access control enforcement:** Unclear if access policies are enforced at API gateway, service layer, or database level (likely inconsistent)
- **Data retention:** No strategy for GDPR right-to-erasure or records retention policies
**Critical Gap:** Auditability requirement directly conflicts with shared database and unclear service ownership. Who is accountable when an audit trail is incomplete or tampered with?
---
## 5. OPERATIONAL READINESS
**Observability:** Inadequate information. Distributed tracing across microservices is essential but unmentioned. Audit log consistency issues will be nearly impossible to debug without correlation IDs and centralized logging.
**Key Gaps:**
- No SLO/SLI definitions for approval workflow latency
- Unclear how to identify which service caused database contention
- Message queue lag monitoring and alerting strategy undefined
**Deployability:** Shared database schema creates deployment coordination nightmare. Any schema migration requires orchestrated deployment of all dependent services, negating microservices agility.
**Maintainability Risks:**
- Schema evolution becomes high-ceremony, cross-team coordination event
- Database performance tuning conflicts (one service needs indexes another finds expensive)
- Unclear rollback strategy if migration or deployment fails mid-flight
**Incident Response:** High MTTR risk. Shared database means any service misbehavior (runaway queries, deadlocks) impacts all services, making root cause analysis complex. Unclear runbook ownership for cross-service failures.
**Change Management:** The architecture creates implicit dependencies. Teams cannot independently evolve services without impacting others, requiring extensive regression testing and coordinated releases.
---
## 6. PRIORITIZED FINDINGS
### **CRITICAL (Must Address Before Production)**
1. **Shared Database Anti-Pattern:** Eliminates microservices benefits, creates deployment coupling, and makes failure blast radius unlimited. Refactor to database-per-service or clearly defined schema ownership with strict API enforcement.
2. **Audit Log Integrity:** Current design cannot guarantee tamper-proof audit trails required for compliance. Implement append-only, immutable audit store with cryptographic verification or leverage specialized audit logging service.
3. **Service Ownership Undefined:** Ambiguous data ownership will cause production incidents. Establish explicit service boundaries with defined APIs and prohibit cross-service database access.
### **HIGH (Address Within 6 Months)**
4. **Database Scalability Bottleneck:** No read replicas, caching, or sharding strategy. Will hit capacity limits under regional load.
5. **Fault Isolation Missing:** Single database failure or message queue outage brings down entire platform. Implement regional isolation and graceful degradation.
6. **Security Model Unclear:** Access control enforcement points undefined. Risk of privilege escalation and compliance violations.
### **MODERATE (Acceptable Short-Term Trade-offs)**
7. **Observability Gaps:** Distributed tracing and correlation needed for operational maturity but can be added incrementally.
8. **Message Queue Resilience:** Dead letter queues and retry policies should be formalized but not blocking if volumes are low initially.
---
## KEY ASSUMPTIONS MADE
- PostgreSQL deployment is single-instance or primary-replica, not distributed/multi-region
- "Microservices" implies 3–10 services, not hundreds
- Approval workflows are human-in-the-loop (minutes/hours latency), not high-frequency transactions
- Organization has DevOps maturity to manage microservices operational complexity
- Message queue is durable but specific technology (Kafka, RabbitMQ, SQS) unspecified
- REST APIs are synchronous request-response, not event-driven
---
## CRITICAL INFORMATION GAPS
**Required for Complete Assessment:**
- Service catalog: How many services, what does each own?
- Database access patterns: Do services share tables or have isolated schemas?
- Regional deployment model: Active-active, active-passive, or geo-sharded?
- Compliance requirements: SOX, GDPR, SOC2, HIPAA applicability?
- Message queue guarantees: At-least-once, exactly-once, ordering requirements?
- Current scale metrics: Transactions/day, approval volume, user count, data growth rate?
- Disaster recovery requirements: RTO/RPO expectations?
---
## RECOMMENDATION SUMMARY
**This architecture is NOT production-ready for enterprise finance/HR workflows in its current form.** The shared database pattern creates unacceptable operational, security, and compliance risks.
**Minimum Viable Path Forward:**
1. Define explicit service ownership boundaries with API contracts
2. Implement database-per-service or enforce strict schema partitioning with access controls
3. Deploy immutable audit logging infrastructure separate from operational database
4. Document and test regional failover procedures
5. Establish observability baseline (distributed tracing, centralized logs, SLOs)
**Estimated Effort:** 3–6 months architectural refactoring before enterprise launch advisable. Current design is suitable only for internal pilot with <100 users and non-compliance-critical workflows.
By purchasing this prompt, you agree to our terms of service
CLAUDE-4-5-SONNET
Review and stress-test large-scale system architectures with an enterprise lens.
This prompt evaluates scalability, reliability, security, data flows, and operational risks—highlighting structural weaknesses, hidden assumptions, and improvement priorities. Designed for architects and tech leads making high-impact design decisions in production environments.
...more
Added over 1 month ago
