How Do You Architect Audit Logging in a Microservices Platform?
Source: Dev.to
Capture Point
- At the API Gateway?
- Inside each microservice?
- A hybrid approach?
Delivery Model
- Synchronous writes?
- Asynchronous pipelines (Kafka, NATS, SQS, etc.)?
Aggregation
- Central audit logging service
- Shared database
- Event log / stream
Failure Strategies
- Fail the business operation?
- Buffer and retry?
Performance
- Avoiding bottlenecks
- Batching, buffering, and backpressure patterns
If you’ve built audit logging across multiple services, I’d appreciate insights on what worked well.