PracHub
QuestionsPremiumLearningGuidesCheatsheetNEWCoaches
|Home/System Design/Snapchat

Design a device owner lookup service

Last updated: Mar 29, 2026

Quick Overview

This question evaluates a candidate's understanding of system design concepts such as real-time event ingestion, handling out-of-order and duplicate events, scalable storage and indexing, and consistency and conflict-resolution trade-offs.

  • nan
  • Snapchat
  • System Design
  • Software Engineer

Design a device owner lookup service

Company: Snapchat

Role: Software Engineer

Category: System Design

Difficulty: nan

Interview Round: Onsite

## Scenario Your server receives a stream of events from clients. Each event contains: - `user_id` - `device_id` - `timestamp` (event time) A device may be associated with different users over time (e.g., shared device, logout/login, resale). ## Core requirement Build a backend service that supports: - `get_device_owner(device_id) -> user_id` Returns the **current owner** of the device. Assume “current owner” means the `user_id` from the **latest event by timestamp** for that `device_id`. ## Constraints / concerns to address - Events may arrive **out of order**. - Clients may retry → **duplicate events**. - Large scale (many devices; high write QPS; low-latency reads). - Define behavior for ties (same timestamp) and missing devices. ## Deliverables - API design (ingestion + query) - Data model - Storage and indexing - How you handle out-of-order/duplicate events - Consistency guarantees and trade-offs - Monitoring and operational considerations

Quick Answer: This question evaluates a candidate's understanding of system design concepts such as real-time event ingestion, handling out-of-order and duplicate events, scalable storage and indexing, and consistency and conflict-resolution trade-offs.

Related Interview Questions

  • Design a News Aggregator - Snapchat (hard)
  • Design real-time ad impression and spend tracking - Snapchat (nan)
  • Design short URL service with click counting - Snapchat (hard)
  • Design a search-to-ads ranking pipeline - Snapchat (medium)
  • Design an Instagram Stories feature - Snapchat (medium)
Snapchat logo
Snapchat
Feb 12, 2026, 12:00 AM
Software Engineer
Onsite
System Design
4
0
Loading...

Scenario

Your server receives a stream of events from clients. Each event contains:

  • user_id
  • device_id
  • timestamp (event time)

A device may be associated with different users over time (e.g., shared device, logout/login, resale).

Core requirement

Build a backend service that supports:

  • get_device_owner(device_id) -> user_id
    Returns the current owner of the device.

Assume “current owner” means the user_id from the latest event by timestamp for that device_id.

Constraints / concerns to address

  • Events may arrive out of order .
  • Clients may retry → duplicate events .
  • Large scale (many devices; high write QPS; low-latency reads).
  • Define behavior for ties (same timestamp) and missing devices.

Deliverables

  • API design (ingestion + query)
  • Data model
  • Storage and indexing
  • How you handle out-of-order/duplicate events
  • Consistency guarantees and trade-offs
  • Monitoring and operational considerations

Solution

Show

Comments (0)

Sign in to leave a comment

Loading comments...

Browse More Questions

More System Design•More Snapchat•More Software Engineer•Snapchat Software Engineer•Snapchat System Design•Software Engineer System Design
PracHub

Master your tech interviews with 7,500+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.