tus protocol details
Headers: Upload-Length, Upload-Offset, Tus-Resumable: 1.0.0
POST→201+Locationupload URLHEAD→ current offset (resume after crash)PATCH→ append chunk, response new offsetChecksumextension optional
Termination: DELETE to abort.
S3 MPU edge cases
- Incomplete MPU — parts stored, object invisible; lifecycle abort after N days avoids storage leak
- Part size — last part can be smaller; min 5 MB except last (except last part rule)
- CopyObject for server-side assemble when client uploaded parts out of order (must fix order at complete)
- Checksum — new data integrity features; verify on complete
Client SDK design
- Parallel part uploads (4–8 workers)
- Exponential backoff on 5xx
- Persist
uploadId+ completed part ETags locally (IndexedDB) - Progress callbacks for UI
- Cancel →
AbortMultipartUpload
Download resume
Range: bytes=N- on GET; store partial file + metadata. HTTP 416 when range invalid.
Comparison
| tus | S3 MPU | |
|---|---|---|
| Abstraction | Protocol | Cloud API |
| Portability | Any tus server | S3-compatible |
| Resume | Core spec | ListParts |
Many products: tus in front → translates to S3 MPU server-side.
Further Reading
- AWS S3 — MPU complete and abort lifecycleReference15m
Hands-On Tasks (Optional)
API design drills and whiteboard exercises — protocol selection, contract design, and bulk-transfer architecture. Assumes Networking and sibling tracks on the hub page (Distributed Systems, Databases, Concurrency, LLD).
- Design MPU lifecycle policy15m
Orphaned multipart uploads after client crash. S3 lifecycle abort rules, server-side tracking, and billing impact of incomplete uploads.