Microservice Communication Patterns

# Microservice Communication Patterns
Communication between services is where complexity lives. Choose wisely.
## Synchronous Communication
**REST APIs**
Simple, well-understood, but creates coupling.
**gRPC**
Fast, efficient, strongly typed. Great for internal services.
**GraphQL**
Flexible queries, but adds complexity.
## Asynchronous Communication
**Message Queues**
Decouple services. Reliable delivery. Better for workflows.
**Event Streaming**
Kafka-style. Real-time, scalable, but eventual consistency.
## When to Use What
**Synchronous for:**
- Real-time user requests
- Strong consistency needs
- Simple request-response
**Asynchronous for:**
- Background processing
- Event-driven workflows
- High-volume data
## Service Mesh
Istio, Linkerd for:
- Service discovery
- Load balancing
- Encryption
- Observability
Don't over-engineer. Start simple, evolve as needed.
