cloudpatterns.appClassroomKatasWhiteboardBlog
Z3 · Data & Storage

Object storage

Object storage

Gold

Object storage keeps files such as photos and videos as whole objects behind an HTTP API, so app servers stay stateless and the files outlive any one server.

Use when
User uploads — photos, videos, documents · Static files and backups
Avoid when
Small structured records you filter and join — that's the database's job
Trade-offs
Storing and delivering files costs money too — weigh it against the compute it saves · Files clients fetch directly need access rules — short-lived signed URLs for private ones
Requires
Horizontal scaling with a stateless tier
3 objectives · 5 misconceptions
  • choose Choose object storage over the database or a server's local disk for user-uploaded files.
  • explain Explain why uploads saved on one web server's disk break a horizontally scaled tier.
  • predict Predict the load on the app servers when clients fetch files straight from storage instead of through the app.
  • Not true: Photos and videos belong in the database like any other data.
  • Not true: Saving uploads on the web server's own disk still works once there are several servers.
  • Not true: Every file download has to pass through the app servers.
  • Not true: Object storage behaves like a normal file system — you can append to a file or edit it in place.
  • Not true: Object storage costs nothing to read from, so request and transfer volume don't matter.

Neighborhood

On linesScale Line

Progress is saved on this device