System Design Notebook / 01
Large-Scale Data Ingestion
How to accept, store, process and track multi-gigabyte jobs without losing them
Accepting a multi-gigabyte upload is not a bigger version of accepting a form. This one walks the whole path: presigned URLs, multipart and resume, the outbox pattern, the queue, and how a caller finds out the job is still alive.
- pages
- 68
- sections
- 35
- editions
- Reading, Print, Tablet
Sign in to read it
Sign in and the whole notebook opens, all three editions with it. An account is what makes a download belong to someone.
Sign in with GitHub or GoogleStart reading
How to use this book
What is inside
Every section, and every one of them opens in the browser. Nothing here is hidden: if a section you need is not in this list, the notebook is not the right one and you should not spend a week on it.
- How to use this book
- The whole system on one page
- 1The problem, stated properly
- 2Clarifying questions that buy you the design
- 3Back-of-the-envelope, before the boxes
- 4The first principle: separate ingestion from processing
- 5Why object storage, not the database
- 6Presigned URLs, keeping the bytes out of your backend
- 7Multipart and resumable upload
- 8Choosing the part size
- 9When the network fails mid-upload
- 10Completing the upload and verifying it
- 11The dual-write problem and the outbox
- 12Why a queue at all
- 13Kafka or RabbitMQ or SQS
- 14The worker loop
- 15Streaming, never loading
- 16Chunking and checkpointing
- 17Idempotency
- 18The lease problem: when the queue thinks you died
- 19Parallelising one big file
- 20Retries, poison pills and the DLQ
- 21The job state machine
- 22Progress without hammering the database
- 23Telling the frontend
- 24Scaling: workers, backpressure and queue depth
- 25Multi-tenancy and fairness
- 26Partial failure: what "failed" means
- 27Cost, the bill nobody mentions
- 28Observability and security
- 29The seven-step delivery script
- 30Whiteboard drawing order
- 31Follow-up question bank
- Appendix A. Numbers to memorise
- Appendix B. Glossary
- Appendix C. Self-test
How to read it
Read with a pen. Every notebook opens with a question to answer before you start and asks you to redo the answer at the end, and the margin in the Print edition exists so you have somewhere to be wrong first. The Tablet edition is 16:9 with vector text, so note apps draw on it rather than treating it as a photograph.