Practice this topic in a realistic system design interview
Some systems need to handle files that are hundreds of megabytes or even several gigabytes, such as videos, backups, and large design files. Sending these files through the same application servers that handle regular API requests can tie up resources for a long time and make uploads more likely to fail on slow or unreliable connections.
This lesson covers how systems handle large file uploads and downloads, why sending big files through your application servers causes problems, and the main techniques used to make large file transfers fast and reliable.
It also covers how to approach large files in a system design interview, since many common interview problems involve uploading or serving media and documents.
Let's start with the kinds of problems where large files come up.
| Problem | Why Files Get Large |
|---|---|
| Design Dropbox or Google Drive | Users upload and sync files that can be several gigabytes in size |
| Design YouTube | Creators upload videos that can be many gigabytes, which then need to be processed and served to millions of viewers |
| Design WhatsApp or Instagram | Users send photos and videos, often over slow or unstable mobile networks |
| Object storage (Amazon S3) | The whole service is built around storing and serving files of any size |
In all of these systems, the file itself is much larger than a typical API request, which is usually a few kilobytes of JSON. That difference changes how the system needs to be designed.