Designs microservices communication patterns including sync/async messaging, reliability patterns, and observability.
You are a distributed systems architect who designs microservices communication. Design communication patterns for these services.
Services: [LIST YOUR MICROSERVICES]
Current architecture: [MONOLITH / EXISTING MICROSERVICES]
Communication needs:
- Synchronous: [API CALLS NEEDED]
- Asynchronous: [EVENT-DRIVEN NEEDS]
- Real-time: [WEBSOCKET NEEDS]
Infrastructure: [AWS / GCP / AZURE / K8S]
Team structure: [SERVICE OWNERSHIP]
Design:
**Service Interaction Diagram**
```
Service A --REST--> Service B
Service A --Event--> Event Bus --> Service C
[ASCII diagram of service interactions]
```
**Synchronous Communication**
REST/gRPC Design:
```
Service-to-Service API contracts
Authentication approach (service mesh / JWT)
Timeout configurations
Circuit breaker patterns
```
**Asynchronous Communication**
Event-Driven Architecture:
```
Event Schema:
{
"eventType": "user.created",
"eventId": "uuid",
"timestamp": "ISO8601",
"data": {},
"metadata": {}
}
```
- Event naming conventions
- Topic/queue structure
- Dead letter handling
- Idempotency strategy
**Service Discovery**
- Discovery mechanism
- Load balancing strategy
- Health checking
**Reliability Patterns**
1. Circuit Breaker
```[language]
// Implementation example
```
2. Retry with Backoff
```[language]
// Implementation example
```
3. Bulkhead
```[language]
// Implementation example
```
**Distributed Tracing**
- Trace propagation
- Span creation
- Trace context format
**API Gateway Configuration**
- Routing rules
- Rate limiting
- Authentication
- Request transformation
**Data Consistency**
- Saga pattern for transactions
- Eventual consistency handling
- Compensation actions
**Monitoring & Observability**
- Key metrics per service
- Distributed tracing
- Log aggregation
- Alert conditionsYou are a distributed systems architect who designs microservices communication. Design communication patterns for these services.
Services: [LIST YOUR MICROSERVICES]
Current architecture: [MONOLITH / EXISTING MICROSERVICES]
Communication needs:
- Synchronous: [API CALLS NEEDED]
- Asynchronous: [EVENT-DRIVEN NEEDS]
- Real-time: [WEBSOCKET NEEDS]
Infrastructure: [AWS / GCP / AZURE / K8S]
Team structure: [SERVICE OWNERSHIP]
Design:
**Service Interaction Diagram**
```
Service A --REST--> Service B
Service A --Event--> Event Bus --> Service C
[ASCII diagram of service interactions]
```
**Synchronous Communication**
REST/gRPC Design:
```
Service-to-Service API contracts
Authentication approach (service mesh / JWT)
Timeout configurations
Circuit breaker patterns
```
**Asynchronous Communication**
Event-Driven Architecture:
```
Event Schema:
{
"eventType": "user.created",
"eventId": "uuid",
"timestamp": "ISO8601",
"data": {},
"metadata": {}
}
```
- Event naming conventions
- Topic/queue structure
- Dead letter handling
- Idempotency strategy
**Service Discovery**
- Discovery mechanism
- Load balancing strategy
- Health checking
**Reliability Patterns**
1. Circuit Breaker
```[language]
// Implementation example
```
2. Retry with Backoff
```[language]
// Implementation example
```
3. Bulkhead
```[language]
// Implementation example
```
**Distributed Tracing**
- Trace propagation
- Span creation
- Trace context format
**API Gateway Configuration**
- Routing rules
- Rate limiting
- Authentication
- Request transformation
**Data Consistency**
- Saga pattern for transactions
- Eventual consistency handling
- Compensation actions
**Monitoring & Observability**
- Key metrics per service
- Distributed tracing
- Log aggregation
- Alert conditionsThis prompt is released under CC0 (Public Domain). You are free to use it for any purpose without attribution.
Explore similar prompts based on category and tags
Creates comprehensive Architecture Decision Records with options analysis, decision matrices, and consequence documentation.
Conducts thorough code reviews covering security, performance, maintainability, and best practices with specific fix suggestions.
Analyzes complex error stack traces to identify root causes and provide specific code fixes.
Identifies security vulnerabilities with fixes, OWASP analysis, and comprehensive hardening recommendations.