Design a low-level audit system for tracking user actions?
This LLD question tests your ability to design a modular, extensible system for logging and auditing events.
Why Interviewers Ask This
Audit systems are critical for security and compliance. Interviewers assess your design patterns, error handling, and ability to create scalable logging architectures that don't impact system performance.
How to Answer This Question
Define interfaces for different event types. Use an observer pattern to notify listeners. Design a storage layer that supports high write throughput. Ensure immutability of records and secure access controls.
Key Points to Cover
- Event interface design
- Observer pattern usage
- Write-ahead logging
- Security and access control
Sample Answer
I would design an AuditSystem with an Event interface for different action types. An EventPublisher would dispatch events to registered Auditors. Storage would use a write-ahead log for durability. I'd implement strict a…
Common Mistakes to Avoid
- Tight coupling between modules
- Ignoring performance bottlenecks
- Lack of data retention policy
Sound confident on this question in 5 minutes
Answer once and get a 30-second AI critique of your structure, content, and delivery. First attempt is free — no signup needed.