+-----------+ INSERT image bytes +-------------+
| Web/API | -----------------------> | Database |
| (HTTP) | | photos(img)|
+-----+-----+ SELECT image bytes +------+------+
| ^ <-------------------------------+
| | BLOBs live here |
v |
Clients
(8–12s upload @3MB; backups heavy)Single web + single SQL DB; images stored as BLOBs
You made a dinky photo app for six friends and a dog. Then someone posted it to a forum. Now uploads crawl like a Victorian novel's plot. Your single database is hoarding image bytes like a dragon sitting on gold—impressive, but impractical. Backups are operas; uploads are epics.
Photos are stored as BLOBs (Binary Large Objects) directly in the PostgreSQL database. This seems simple, but it has brutal side effects: the database buffer cache fills up with photo bytes instead of useful metadata rows. Backups balloon to hundreds of gigabytes. Replication slows to a crawl copying binary blobs. Long-running writes hold locks. The database is optimized for small, structured, indexed data—not 5MB JPEGs.