System Design Prompt
You are tasked with designing a backend service for uploading recorded body-camera and dashcam footage from client devices, which often operate on unreliable networks. The uploaded videos are intended for use as legal evidence, necessitating a system that supports large files, incorporates security scanning, and maintains a tamper-evident chain of custody.
Core Requirements
- Large Blob Uploads
- Video files can be multiple gigabytes in size.
- Uploads must be resumable and resilient to flaky network connectivity.
- Clients will upload files in chunks.
- The system must not fully trust the cloud provider’s built-in multipart “finalization” process; you must be able to independently prove server-side what bytes were received and correctly assembled.
- Malicious Content Detection
- All newly uploaded blobs must be treated as untrusted.
- Security checks (e.g., malware scanning, file-type validation) must be performed before making content available to users or downstream systems.
- Chain of Custody
- The system must generate an auditable, tamper-evident history of all actions performed on a piece of footage. This includes, but is not limited to, upload, scan results, moves, access/download/export events, retention/legal hold changes, and deletion.
- The system should provide mechanisms to help prove that footage has not been altered since its initial upload.
What to Cover
Your design discussion should encompass the following areas:
- APIs and data model (covering upload sessions, chunk tracking, and metadata)
- Storage layout (distinguishing between quarantine and public/evidence storage)
- Background processing pipeline (for assembly, scanning, and promotion of content)
- Integrity verification approach (e.g., using checksums/hashes)
- Chain-of-custody design (focusing on an immutable audit log)
- Access control and security considerations
- Key tradeoffs and strategies for handling failures and edge cases
AI interview prep
Core dilemma
Balancing high-throughput, resumable uploads of large, untrusted files over unreliable networks with stringent requirements for tamper-evident data integrity, auditable chain of custody, and robust security scanning.
3 tradeoffs and 3 stress tests locked
Interview prep
Unlock the interviewer X-Ray rubric, tradeoff matrix, stress tests, clarifying questions, and key concepts.
System Design Prompt
You are tasked with designing a backend service for uploading recorded body-camera and dashcam footage from client devices, which often operate on unreliable networks. The uploaded videos are intended for use as legal evidence, necessitating a system that supports large files, incorporates security scanning, and maintains a tamper-evident chain of custody.
Core Requirements
- Large Blob Uploads
- Video files can be multiple gigabytes in size.
- Uploads must be resumable and resilient to flaky network connectivity.
- Clients will upload files in chunks.
- The system must not fully trust the cloud provider’s built-in multipart “finalization” process; you must be able to independently prove server-side what bytes were received and correctly assembled.
- Malicious Content Detection
- All newly uploaded blobs must be treated as untrusted.
- Security checks (e.g., malware scanning, file-type validation) must be performed before making content available to users or downstream systems.
- Chain of Custody
- The system must generate an auditable, tamper-evident history of all actions performed on a piece of footage. This includes, but is not limited to, upload, scan results, moves, access/download/export events, retention/legal hold changes, and deletion.
- The system should provide mechanisms to help prove that footage has not been altered since its initial upload.
What to Cover
Your design discussion should encompass the following areas:
- APIs and data model (covering upload sessions, chunk tracking, and metadata)
- Storage layout (distinguishing between quarantine and public/evidence storage)
- Background processing pipeline (for assembly, scanning, and promotion of content)
- Integrity verification approach (e.g., using checksums/hashes)
- Chain-of-custody design (focusing on an immutable audit log)
- Access control and security considerations
- Key tradeoffs and strategies for handling failures and edge cases