Design access control and heartbeat systems
System Design: Access Control and Heartbeat Monitoring
This interview challenges you to design two distinct backend systems.
Part A: Door Access Control System
Design a service responsible for managing and enforcing access permissions for physical doors. The system must support the following core functionalities:
- Given a person's ID, retrieve a list of all doors that person is authorized to open.
- Given a door's ID, retrieve a list of all people who are authorized to open that door.
- Allow an administrator to grant a specific person access to a specific door.
Your design discussion should cover the data model, API design, indexing strategies for efficient lookups, authorization rules, mechanisms for auditability, and considerations for future operations such as revoking access.
Part B: Device Heartbeat Monitoring System
Design a system to monitor the health and online status of a large fleet of devices.
System Requirements:
- The system must handle 10 million devices.
- Each device sends a heartbeat once per minute.
- A dashboard must be built to display device health and online status.
Your design discussion should address:
- Expected write throughput calculations.
- The overall ingestion architecture for heartbeats.
- Storage design for both recent device status and historical heartbeat data.
- The logic and mechanisms for determining whether a device is currently online or offline.
- Dashboard APIs and useful metrics to expose.
- Considerations for reliability, scaling, and failure handling across the system.
AI interview prep
Core dilemma
Balancing the need for high-volume, low-latency ingestion and real-time status updates for 10 million devices against the requirements for long-term historical data retention and cost-effective storage, while simultaneously designing a flexible, secure, and auditable access control system.
3 tradeoffs and 3 stress tests locked
Interview prep
Unlock the interviewer X-Ray rubric, tradeoff matrix, stress tests, clarifying questions, and key concepts.
Design access control and heartbeat systems
System Design: Access Control and Heartbeat Monitoring
This interview challenges you to design two distinct backend systems.
Part A: Door Access Control System
Design a service responsible for managing and enforcing access permissions for physical doors. The system must support the following core functionalities:
- Given a person's ID, retrieve a list of all doors that person is authorized to open.
- Given a door's ID, retrieve a list of all people who are authorized to open that door.
- Allow an administrator to grant a specific person access to a specific door.
Your design discussion should cover the data model, API design, indexing strategies for efficient lookups, authorization rules, mechanisms for auditability, and considerations for future operations such as revoking access.
Part B: Device Heartbeat Monitoring System
Design a system to monitor the health and online status of a large fleet of devices.
System Requirements:
- The system must handle 10 million devices.
- Each device sends a heartbeat once per minute.
- A dashboard must be built to display device health and online status.
Your design discussion should address:
- Expected write throughput calculations.
- The overall ingestion architecture for heartbeats.
- Storage design for both recent device status and historical heartbeat data.
- The logic and mechanisms for determining whether a device is currently online or offline.
- Dashboard APIs and useful metrics to expose.
- Considerations for reliability, scaling, and failure handling across the system.