Local, block, file, object storage
We decide what operations the application needs before choosing where bytes live. A disk, a filesystem, an object service, and a database expose different promises even if all eventually use physical drives. We will trace their boundaries, compare their failure ownership, and calculate a small allocation example.
#Section 1Local disk and the lifetime of a machine
A Heron worker saves an uploaded clip under its local temporary directory, then the worker is replaced. The next worker has the database row but cannot find the bytes. Local disk is storage attached to the machine or its local execution environment, whose availability and retention follow that environment’s rules.
Local storage can be useful for buffers, intermediate conversion files, caches, or state that another source can reconstruct. It is unsafe as the only durable copy of a published clip unless the machine’s retention and recovery contract actually meets the requirement. A container path is not automatically a persistent host path, and a host path is not automatically a replicated recovery copy.
Separate processing scratch space from authoritative stored media. A conversion worker can download an immutable source object, build renditions locally, and publish new objects after verification. If it crashes, another worker repeats that job from retained source state rather than depending on its abandoned scratch directory.
#Section 2Block storage exposes addressable blocks
The score database needs to change a small page within a large persistent dataset. Block storage exposes a sequence of addressable blocks to a host, commonly as a device-like volume. A filesystem or database organizes those blocks into its own structures, and that higher layer supplies names and transactions.
A volume being durable does not mean it has a shared-filesystem interface. Multiple writers require a supported coordination and filesystem model. A crash can leave dirty in-memory pages absent from persistent storage, so the database’s flush, log, and recovery rules still matter. Storage completion semantics need verification at the device and software boundary.
For an illustrative allocation exercise, store 5,000,000,000 bytes in 4,096-byte blocks. Rounding the division upward gives 1,220,704 blocks. Their allocated total is 5,000,003,584 bytes, leaving 3,584 bytes of final-block padding. This is a simplified contiguous accounting model, not an actual filesystem space report.
#Section 3File storage supplies a namespace
Several workers need named files in shared directories. File storage exposes a filesystem-like namespace and operations such as opening paths, reading ranges, and changing files. Its supported locking, rename, permissions, and cache semantics must be checked for the chosen protocol and implementation.
Names add coordination work. A directory listing, file lock, and file-content write can have different visibility rules across clients. If Heron stores uploaded media through a shared filesystem, it must understand when a finished file becomes visible and how a crashed writer leaves partial content. Publishing through a supported atomic rename can help in some filesystems, but that assumption cannot be transferred to every remote storage service.
File storage can suit applications built around path operations or shared file tooling. Object storage can suit complete named media objects with a separate metadata database. Choose by the operations and failure contract, then size bandwidth and metadata contention. Familiar path syntax alone is not a reason to impose a filesystem on a workload that needs immutable objects.
#Section 4Object storage and databases have different jobs
A clip is a large byte sequence; its owner, visibility, processing state, and match relationship are small structured facts. Object storage stores named objects through an object API. A database stores structured state with query and update guarantees appropriate to its model.
Heron keeps clip bytes in the object service and searchable application facts in its metadata database. That division lets the application authorize a small operation while the client transfers bytes without passing them through application workers. It also creates a coordination problem: the database and object service do not share the same transaction.
If the clip is stored but its database publication fails, the bytes may be orphaned. If metadata publishes before upload is verified, a viewer can be directed to missing or unsafe content. The later parts solve this through explicit upload states and idempotent completion rather than pretending a cross-service transaction exists.