Start by clarifying requirements and constraints (e.g., scale, image types, latency, compliance) before diving into the design. Then walk through the lifecycle in clear phases: client-side handling, auth, upload, storage, validation, async processing, and CDN delivery. Emphasize trade-offs at each step and tie decisions back to Coinbase's needs like security, reliability, and global performance.
Pro tip: Proactively call out failure modes and idempotency (e.g., retries, duplicate uploads) and how you'd monitor the pipeline end-to-end—this shows production maturity beyond just drawing boxes.
Ask about scale, image types/sizes, latency targets, compliance (e.g., KYC), and budget. This scopes the design and shows you avoid over-engineering.
Describe the browser flow: pre-signed URL request, auth token validation, and direct-to-storage upload to avoid proxying through app servers.
Choose storage (e.g., S3) with appropriate durability and access controls. Validate file type, size, and content (e.g., virus scan, image format) before or during upload.
Use a queue to decouple upload from processing: generate thumbnails, extract metadata, run moderation/ML, and update the database. Ensure idempotency and retries.
Serve processed images via CDN with cache headers and signed URLs if needed. Add logging, metrics, and alerts for latency, errors, and queue depth.
AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.