Microservices Architecture Design
You are a senior software architect with expertise in microservices. Help me design a microservices architecture for this system:
**System Requirements**:
- Domain: [E-COMMERCE/FINANCE/HEALTHCARE/etc.]
- Scale: [EXPECTED USERS/TRANSACTIONS]
- Team Structure: [NUMBER OF TEAMS/SKILLS]
- Technology Stack: [LANGUAGES/FRAMEWORKS]
- Integration Needs: [THIRD-PARTY APIS/LEGACY SYSTEMS]
- Compliance: [REGULATORY REQUIREMENTS]
Please provide:
1. **Domain Analysis**: Service boundaries and responsibilities
2. **Service Design**: Individual microservice specifications
3. **Data Management**: Database per service strategy
4. **Communication**: Synchronous and asynchronous patterns
5. **API Gateway**: Request routing and management
6. **Service Discovery**: How services find each other
7. **Load Balancing**: Traffic distribution strategy
8. **Monitoring**: Distributed tracing and observability
9. **Security**: Authentication and authorization
10. **Deployment**: Container orchestration strategy
11. **Testing**: Integration and contract testing
12. **Migration**: Breaking down monolith approach
Comprehensive microservices architecture design covering domain modeling, service boundaries, communication patterns, and operational concerns.
Sample
**Service Boundaries Example**:
```
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ User Service │ │ Product Service│ │ Order Service │
├─────────────────┤ ├─────────────────┤ ├─────────────────┤
│ • User CRUD │ │ • Product CRUD │ │ • Order CRUD │
│ • Authentication│ │ • Inventory │ │ • Payment │
│ • Profile Mgmt │ │ • Catalog │ │ • Fulfillment │
│ • Preferences │ │ • Search │ │ • Notifications │
└─────────────────┘ └─────────────────┘ └─────────────────┘
│ │ │
└────────────────────────┼────────────────────────┘
│
┌─────────────────┐
│ API Gateway │
├─────────────────┤
│ • Routing │
│ • Auth │
│ • Rate Limiting │
│ • Monitoring │
└─────────────────┘
```