Design Upload-Time Safety Scanning for User Media Across Google Products

Last updated: November 29, 2026

Quick Overview

Design a shared service that scans images and videos uploaded to Google products (Photos sharing, Drive public links, YouTube, Chat) for policy violations, using hash matching and classifiers, before or shortly after the content becomes visible.

Google
System Design
Software Engineer
Google
November 29, 2026
Software Engineer
System Design Round
System Design
Hard

0

0

0 solved


Design a shared service that scans images and videos uploaded to Google products (Photos sharing, Drive public links, YouTube, Chat) for policy violations, using hash matching and classifiers, before or shortly after the content becomes visible.

Every Google surface that accepts uploads needs abuse protection, and a shared platform avoids each team rebuilding it. Interviewers use this to probe latency budgets for blocking scans, hash-matching at scale, classifier cost on video, and the policy and appeal workflow around automated decisions.

What the Interviewer Expects
  • Offer synchronous and asynchronous scan modes with different latency budgets
  • Match against known-bad hash databases with perceptual hashing
  • Run classifiers efficiently, sampling video frames
  • Route results to product-specific policy actions and human review
  • Keep audit trails and appeals while protecting reviewer wellbeing
Key Topics to Cover
Perceptual hashing
Classifier serving
Async pipelines
Policy engine
Human review
How to Approach This
  1. Start by clarifying functional and non-functional requirements with the interviewer.
  2. Estimate the scale: QPS, storage, bandwidth. This drives your design decisions.
  3. Draw a high-level architecture first, then deep dive into 1-2 critical components.
  4. Discuss trade-offs explicitly (e.g., consistency vs availability, SQL vs NoSQL).
  5. Address failure scenarios, monitoring, and how the system handles 10x traffic spikes.
Possible Follow-up Questions
  • Which surfaces must block before the upload is visible, and which can scan after?
  • How do you detect slightly edited copies of known bad content?
  • How do you keep reviewers from being exposed to harmful content unnecessarily?
  • How do you roll out a new classifier without a flood of false takedowns?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Practice System Design Problems
Sample Answer
Requirements

Functional: products call scan(media, context); the service returns verdicts per policy (for example violent extremism, sexual content, malware for files, spam) with confidence; products apply t...

High-Level Design
  • Scan API with sync and async modes.
  • Hash matcher: computes exact (SHA-256) and perceptual hashes and looks them up in industry and internal hash databases.
  • Classifier fleet: image an...

Submit Your Answer
Markdown supported