← Verkada Interview Insights

Verkada·Software Engineer·Onsite - System Design / Architecture·Intermediate

IntermediatePrefer not to say
Jul 2026

Summary

Verkada system design round with two back-to-back problems, both pretty meaty. The door access one felt manageable but the heartbeat monitoring problem at 10 million devices scale pushed me to think harder about write throughput than I expected.

Questions Asked (2)

Q1

Design a door access control system that supports looking up which doors a person can open, which people can open a given door, and granting access as an admin. Cover data modeling, API design, indexing, authorization, auditability, and future operations like revoking access.

System DesignData ModelingAPI & Integrations
Author's notes

The bidirectional lookup requirement is what tripped me up first.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the core entities and relationships (users, doors, permissions), then design a normalized data model that supports efficient bidirectional lookups. Layer on API design, indexing strategy, and authorization controls before addressing cross-cutting concerns like audit logging and future operations such as revocation and time-based access.

Pro tip: Since Verkada is a physical security company, demonstrate domain awareness by discussing real-world constraints like time-based access windows (e.g., an employee can only enter between 9am–6pm), door groups or zones, and the difference between online and offline door controllers that may need to cache permissions locally.

1. Define Core Entities & Data Model

Identify the primary entities — Users, Doors, Roles, and AccessGrants — and model their relationships. Use a junction table (e.g., access_grants) with foreign keys to user and door, plus metadata fields like granted_by, granted_at, expires_at, and is_active to support future operations.

2. Design the API Surface

Define RESTful endpoints covering the three core queries: GET /users/{userId}/doors (doors a person can open), GET /doors/{doorId}/users (people who can open a door), and POST /doors/{doorId}/grants (admin grants access). Include endpoints for revoking access (DELETE or PATCH) and listing audit logs.

3. Indexing & Query Optimization

Add a composite index on (user_id, is_active) for user-to-door lookups and a composite index on (door_id, is_active) for door-to-user lookups. Consider a covering index that includes expires_at to efficiently filter time-based access without additional table scans.

4. Authorization & Role-Based Access Control

Implement RBAC where only users with an Admin or DoorManager role can call grant/revoke endpoints, enforced via middleware. Consider scoped permissions so a building manager can only manage doors within their assigned facility, preventing privilege escalation.

5. Auditability & Future Operations

Append every grant, revoke, and access-check event to an immutable audit_log table with actor, action, target, timestamp, and IP address. Design the schema to support future features like time-windowed access, group-based permissions, and bulk revocation (e.g., when an employee is offboarded) by keeping grants soft-deletable and queryable.

Key Points to Mention

  • Bidirectional indexing strategy: separate indexes on user_id and door_id in the access_grants table to make both lookup directions O(log n) efficient
  • Soft deletes and expiry fields (is_active, expires_at) to support revocation and time-based access without destroying historical data
  • Immutable audit log as a separate append-only table or event stream (e.g., Kafka) to track who granted/revoked access and when, satisfying compliance requirements
  • RBAC with scoped admin roles so permissions can be delegated at the organization, building, or floor level without over-privileging users
  • Caching considerations for door controllers that may operate offline, requiring a local permission snapshot that syncs periodically and handles stale cache invalidation on revocation
  • Group or policy-based access as a scalability improvement over per-user grants, allowing a single policy change to affect thousands of users simultaneously

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q2

Design a heartbeat monitoring system for 10 million devices where each device sends a signal every minute. Build a dashboard showing device health and online/offline status. Discuss write throughput, ingestion architecture, storage for recent vs historical data, how you determine online/offline, dashboard APIs, and how the system handles failures at scale.

System DesignTechnical Trade-offsProduct Analytics & Metrics
Author's notes

10 million devices pinging once per minute is roughly 167k writes per second.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by quantifying the scale (10M devices × 1 signal/min = ~167K writes/sec) to anchor all architectural decisions in concrete numbers. Then walk through the system layer by layer — ingestion, storage tiering, online/offline detection logic, and dashboard APIs — explicitly calling out trade-offs at each stage. Ground your design in Verkada's domain: reliability and real-time visibility are critical for physical security infrastructure.

Pro tip: Proactively address the 'thundering herd' problem — if all 10M devices reconnect simultaneously after a network partition, your ingestion layer must handle a massive spike without cascading failures. Mentioning this edge case signals you think about failure modes at scale, not just the happy path.

1. Quantify Scale & Define Requirements

Calculate write throughput (~167K writes/sec sustained, with burst headroom of 2-3x), define SLOs for staleness tolerance (e.g., a device is 'offline' if no heartbeat in 2-3 minutes), and clarify dashboard latency requirements (near real-time vs. eventual consistency).

2. Design the Ingestion Pipeline

Use a horizontally scalable message queue (e.g., Kafka with partitioning by device_id) to decouple producers from consumers, absorb traffic spikes, and provide replay capability. Lightweight edge agents or load balancers handle initial device connections before publishing to the queue.

3. Define Storage Architecture (Hot vs. Cold)

Store recent heartbeat state (last seen timestamp per device) in a low-latency key-value store like Redis or DynamoDB for O(1) online/offline lookups. Persist historical heartbeat data to a time-series database (e.g., InfluxDB, TimescaleDB) or columnar store (e.g., Cassandra, S3+Parquet) for trend analysis and auditing.

4. Implement Online/Offline Detection Logic

Use a stream processing layer (e.g., Kafka Streams, Flink) to consume heartbeats and update a 'last_seen' timestamp per device; a separate sweeper service or TTL-based expiry flags devices as offline after a configurable threshold (e.g., 2 missed heartbeats). Avoid polling the full device table — instead, use event-driven state transitions to minimize unnecessary work.

5. Design Dashboard APIs & Failure Handling

Expose paginated REST or GraphQL APIs backed by the hot store for current device status, with WebSocket or SSE push for real-time updates on status changes. For failures, discuss consumer group rebalancing in Kafka, Redis replication/sentinel for HA, circuit breakers on downstream services, and graceful degradation (e.g., serving stale status with a staleness indicator rather than returning errors).

Key Points to Mention

  • Write throughput math: 10M devices × 1/min = ~167K writes/sec, requiring horizontal partitioning and backpressure mechanisms
  • Kafka (or equivalent) as the ingestion backbone for durability, replay, and decoupling — partition by device_id for ordering guarantees per device
  • Two-tier storage: Redis/DynamoDB for hot 'last seen' state (O(1) lookups) vs. time-series DB for historical data with TTL-based data lifecycle policies
  • Online/offline detection via TTL expiry or stream processing with configurable thresholds, avoiding false positives during brief network blips
  • Dashboard API design: pagination and filtering for 10M devices, WebSocket/SSE for push-based real-time updates, and caching layers to reduce hot-store pressure
  • Failure resilience: thundering herd on reconnection, Kafka consumer lag monitoring, Redis HA with replication, and idempotent heartbeat processing to handle duplicate signals

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.