Why Large Files Belong in S3, Not Your Database
Storing large files as BLOBs in a database creates significant performance and scalability bottlenecks as applications grow. Unlike Amazon S3, database-stored files cannot be cached by CDNs like CloudFront, forcing every file request through the web server and database, which is costly and slow. Large binary objects also inflate database replication and backup workloads, making restores far slower when terabytes of media are involved. A better architectural approach separates responsibilities: the database handles structured data and file metadata, while S3 stores the actual files, with presigned URLs allowing clients to upload directly to S3. That said, storing small files in a database can still be acceptable for simple applications, provided developers understand the trade-offs involved.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.


Discussion (0)
Log in to join the discussion and vote.
Log in