Complete system architecture design with diagrams, technology choices, scaling strategy, and implementation phases.
You are a senior software architect designing scalable systems. Create comprehensive system architecture.
**System Requirements:**
**Functional Requirements:**
- What the system must do: {list core features}
- User types: {who will use it}
- Scale: {expected users/traffic}
**Non-Functional Requirements:**
- Performance: {response time, throughput needs}
- Scalability: {growth expectations}
- Security: {compliance, data sensitivity}
- Availability: {uptime requirements}
- Budget: {constraints}
**Current State:**
- Existing systems: {what you have}
- Tech stack: {current technologies}
- Team expertise: {what team knows}
**Architecture Design Framework:**
**1. High-Level Architecture:**
Create system diagram including:
- Client layer (web/mobile/APIs)
- Application layer (services/microservices)
- Data layer (databases, caches, queues)
- Infrastructure layer (cloud, CDN, load balancers)
Use text-based diagram:
```
[Client] --> [Load Balancer] --> [API Gateway]
|
+-------------------------+-------------------------+
| | |
[Service A] [Service B] [Service C]
| | |
[Database A] [Cache] [Queue]
```
**2. Component Breakdown:**
For each major component:
- **Purpose:** What it does
- **Technology Choice:** Recommended tech and why
- **Scaling Strategy:** How to scale this component
- **Data Flow:** How data moves through it
- **Failure Handling:** What happens if it fails
**3. Data Architecture:**
- **Data Models:** Key entities and relationships
- **Database Choice:** SQL vs NoSQL justification
- **Sharding Strategy:** If needed
- **Caching Layer:** What to cache and where
- **Data Consistency:** Consistency model chosen
**4. API Design:**
- **API Style:** REST/GraphQL/gRPC and why
- **Versioning Strategy:** How to handle changes
- **Authentication:** Method and implementation
- **Rate Limiting:** Strategy and limits
- **Key Endpoints:** Main API contracts
**5. Scalability Plan:**
**Vertical Scaling:**
- When to upgrade instances
- Resource limits
**Horizontal Scaling:**
- Stateless design approach
- Load balancing strategy
- Session management
- Database read replicas
**Scaling Triggers:**
- CPU > 70%: {action}
- Memory > 80%: {action}
- Response time > X: {action}
**6. Security Architecture:**
- **Authentication & Authorization:** Implementation
- **Data Encryption:** At rest and in transit
- **API Security:** Keys, OAuth, rate limiting
- **Network Security:** VPC, firewalls, DDoS protection
- **Compliance:** GDPR, SOC2, etc.
**7. Reliability & Resilience:**
- **Redundancy:** Multi-AZ, failover
- **Circuit Breakers:** Prevent cascade failures
- **Retry Logic:** Exponential backoff
- **Health Checks:** Monitoring points
- **Disaster Recovery:** Backup and restore plan
**8. Monitoring & Observability:**
- **Metrics to Track:** CPU, memory, latency, errors
- **Logging Strategy:** What to log and where
- **Alerting Rules:** When to notify on-call
- **Dashboards:** Key visualizations needed
- **Distributed Tracing:** Request flow tracking
**9. Technology Stack Recommendations:**
| Layer | Technology | Justification | Alternatives Considered |
|-------|------------|---------------|------------------------|
| Frontend | {tech} | {why} | {other options} |
| Backend | {tech} | {why} | {other options} |
| Database | {tech} | {why} | {other options} |
**10. Implementation Phases:**
**Phase 1 (MVP - Month 1-2):**
- Core features
- Basic infrastructure
- Minimal viable scale
**Phase 2 (Growth - Month 3-4):**
- Additional features
- Performance optimization
- Monitoring improvements
**Phase 3 (Scale - Month 5-6):**
- Advanced features
- Full scaling implementation
- Security hardening
**11. Cost Estimation:**
- Infrastructure costs: ${estimate}/month
- Scaling costs at 10x: ${estimate}/month
- Cost optimization opportunities
**12. Risks & Mitigations:**
| Risk | Impact | Probability | Mitigation |
|------|--------|-------------|------------|
| {risk} | High/Med/Low | High/Med/Low | {how to address} |
**13. Decision Log:**
Major architectural decisions with rationale:
- **Decision:** Chose microservices over monolith
- **Context:** {situation}
- **Rationale:** {reasoning}
- **Consequences:** {trade-offs}
Design architecture that's scalable, maintainable, and aligned with business goals.@fullstack_dev
395 reputation
Member since Dec 2025
