Part 7 · Blueprint 40
Distributed Blob & Object Storage (Amazon S3 Scale)
12 min reading · Sources · Editorial review pending
Byte durability does not by itself make publication atomic with an application record.
Page details
Published date · Last edited:
Draft edition. Editorial review and supplementary reading recommendations are still being completed.
Format: Architecture walkthrough. Prerequisites: the beginner bootcamp. Chapter prerequisites: Database Sharding & Consistent Hashing, Replication, Consensus & Automated Failover, Idempotency Keys & Distributed Retries.
Sixty-second mental model
Problem: Byte durability does not by itself make publication atomic with an application record.
Use: Separate placement, integrity and visibility transitions.
Design boundary: Design the storage service itself: naming metadata, multipart completion, fragment placement, integrity verification and repair. This is broader than an application uploading a blob to an existing service.
Layer 1 · Intuition
Hypothetical scenario: Northwind is designing object storage. Maya represents product requirements, Dev implementation and Priya reliability. The team must agree what one object means and which component owns the object metadata version.
Think of a warehouse separating package labels from stored bytes. Separate the requester from object metadata version, then identify the retained evidence needed after failure.
- Authority
- The entitled state owner.
- Invariant
- A rule preserved across concurrency and failures.
- Block storage
- A storage interface exposing addressable blocks. Analogy: A numbered set of storage slots the owner organizes.
- Object storage
- A service storing byte objects under keys with metadata. Analogy: A warehouse that retrieves sealed packages by label.
Architecture and worked reasoning
Design boundary: Design the storage service itself: naming metadata, multipart completion, fragment placement, integrity verification and repair. This is broader than an application uploading a blob to an existing service.
Responsibilities on the request path
Workload and limiting resource
Hypothetical 6-data + 3-parity erasure coding uses 9 / 6 = 1.5× raw payload bytes before metadata and padding. A 600 MB object becomes nine 100 MB fragments, totaling 900 MB. Losing a 100 MB fragment can require reading multiple surviving fragments; 1.5× storage overhead is not a claim about repair bandwidth.
Keep the units attached to each intermediate result. The assumptions above describe a hypothetical exercise, not observed vendor capacity. A real capacity decision also needs a measured service curve, skew, recovery traffic and an explicit admission policy for overload.
Mutation or publication path
- Allocate a version and multipart intent.
- Store verified parts/fragments across chosen failure domains.
- Publish a complete manifest under the selected commit rule.
Observation and recovery path
- Resolve a key/version to its manifest.
- Read sufficient verified fragments.
- Reconstruct or repair missing fragments without publishing corrupt output.
Failure that changes the decision
Hypothetical scenario: Metadata commits a manifest before enough fragments are durable. Readers see a named object they cannot reconstruct; couple publication to the actual durability threshold.
Attempt this decision before reading the explanation
Can three missing fragments always be tolerated if they share one failure domain?
The coding threshold applies only if enough distinct valid fragments remain. Placement and correlated failures determine whether the intended fault tolerance is realized.
Supporting mechanism analysis
Hypothetical scenario: Northwind. Maya represents product, Dev implementation and Priya reliability. The following workflow develops the underlying mechanism.
Hypothetical scenario. Northwind adds product images. One upload reaches object storage, but the metadata update does not finish. Dev can point to the uploaded bytes; Priya cannot find a catalogue record that safely tells a visitor to use them.
This makes the intermediate states explicit. The worked flow also needs a recovery decision for an uploaded object whose publication never completes.
Amazon S3’s user guide provides a concrete object-storage model. Using S3 does not eliminate the application’s product relationship, publication state or access rules. Those remain explicit responsibilities even where the storage service supplies useful object metadata and versioning capabilities.
Begin with a metadata intent identifying the product, proposed image version and permitted uploader. It is not yet a public ready image. Allocate an object identity that will not overwrite an unrelated product’s bytes. The client or upload service then transfers the object through a path authorized for that intent.
Hypothetical scenario. Product Q7 points to image manifest M12, which names immutable object O12 and its checksum. An upload intent begins pending; verification establishes the expected bytes; a conditional metadata update makes M12 current. Uploading O12 alone never makes it the product's selected image.
Replication stores full copies; erasure coding distributes data and parity fragments. A toy six-data-plus-three-parity stripe has nine fragments and a 9 ÷ 6 = 1.5 raw size multiplier at equal fragment size, before metadata and padding. This arithmetic says nothing about a particular provider's durability or failure independence. Choose protection with repair traffic, fragment placement and degraded reads in view.
Hypothetical worked example. Choose one hundred product images, each with a selected payload of 2,000,000 bytes. Total object payload is 100 × 2,000,000 = 200,000,000 bytes. Choose five hundred bytes for each associated metadata record. Metadata payload is 100 × 500 = 50,000 bytes before database structure, indexes and history.
For an illustrative upload burst of ten images per second, object payload demand is 10 × 2,000,000 = 20,000,000 bytes per second. New metadata payload at one record per image is 10 × 500 = 5,000 bytes per second. Requests, protocol overhead, integrity checks, replication and processing outputs are excluded from both estimates.
For incomplete intents, define expiration and a recovery decision. For uploaded but unpublished objects, define whether a retry can resume publication or whether cleanup may eventually remove them. For a broken ready reference, stop claiming a usable image and retain evidence needed to repair or replace it.
S3 documents its object model and consistency behavior. Those guarantees concern operations within the service’s defined scope. They do not make a separate product database update atomic with an object upload. Northwind’s publication workflow still needs to connect the two outcomes and handle a failure between them.
Hypothetical failure scenario. The object store retains the image, but the publication request times out before the catalogue records the ready reference. A second attempt uploads another copy and marks the first abandoned. Repeated attempts consume storage while the reader still sees no image.
Layer 3 · Internals
An object service separates a naming and version catalog from the nodes holding bytes. The metadata path resolves a bucket/key and version into an object manifest; the data path transfers verified fragments. Multipart upload needs an explicit completion transition so readers cannot confuse accepted parts with a complete published object.
Erasure coding reduces redundancy overhead at the cost of reconstruction work and placement constraints. A hypothetical 6-data plus 3-parity layout stores nine fragments for six fragments of payload: 9 ÷ 6 = 1.5 times the payload before metadata and operational reserve. Recoverability depends on independent fragment placement and the code's actual failure assumptions; the arithmetic is not a durability percentage. Checksums can detect damaged bytes but do not recreate them without another valid source. Garbage collection must respect retained versions, incomplete uploads and live manifests. Deleting fragments immediately after a metadata change can race a reader that legitimately holds the preceding manifest.
Trade-offs and limits
| Approach | Provides | Requires |
|---|---|---|
| Full replica placement | Straightforward reads and reconstruction from a complete copy. | Higher byte redundancy for the selected replica count. |
| Erasure-coded fragments | Lower redundancy for a chosen failure tolerance. | Reads and recovery can require multiple fragments and extra computation. |
Recovery decision
Hypothetical scenario: Metadata commits a manifest before enough fragments are durable. Readers see a named object they cannot reconstruct; couple publication to the actual durability threshold.
The coding threshold applies only if enough distinct valid fragments remain. Placement and correlated failures determine whether the intended fault tolerance is realized.
Write your design before revealing the review
Can three missing fragments always be tolerated if they share one failure domain?
Drafts and self-review are stored only in this browser. They are separate from reading completion.
Compare your decision
The coding threshold applies only if enough distinct valid fragments remain. Placement and correlated failures determine whether the intended fault tolerance is realized.
Metadata commits a manifest before enough fragments are durable. Readers see a named object they cannot reconstruct; couple publication to the actual durability threshold.
Check your understanding
Can three missing fragments always be tolerated if they share one failure domain?
The coding threshold applies only if enough distinct valid fragments remain. Placement and correlated failures determine whether the intended fault tolerance is realized.
How would you recover from this failure: Metadata commits a manifest before enough fragments are durable. Readers see a named object they cannot reconstruct; couple publication to the actual durability threshold.
Start with the exact boundary that failed. Allocate a version and multipart intent. Store verified parts/fragments across chosen failure domains. Publish a complete manifest under the selected commit rule. Then recover evidence through the observation path: Resolve a key/version to its manifest. Read sufficient verified fragments. Reconstruct or repair missing fragments without publishing corrupt output. Preserve the distinction between a confirmed state change and an unavailable response.
Which assumption in the worked calculation would a burst or concentrated tenant invalidate first?
Hypothetical 6-data + 3-parity erasure coding uses 9 / 6 = 1.5× raw payload bytes before metadata and padding. A 600 MB object becomes nine 100 MB fragments, totaling 900 MB. Losing a 100 MB fragment can require reading multiple surviving fragments; 1.5× storage overhead is not a claim about repair bandwidth. Recompute the affected resource rather than multiplying unrelated storage and network budgets by the same factor. Design the storage service itself: naming metadata, multipart completion, fragment placement, integrity verification and repair. This is broader than an application uploading a blob to an existing service.
Which component in this topology could be removed from a smaller first deployment?
Metadata catalog, Placement map, Storage fragments, Repair controller name responsibilities, not a requirement for separate processes. Co-locate responsibilities when their transaction, trust and capacity boundaries permit it. Allocate a version and multipart intent.
What evidence must a caller have before relying on the observation path?
Resolve a key/version to its manifest. Read sufficient verified fragments. Reconstruct or repair missing fragments without publishing corrupt output. The coding threshold applies only if enough distinct valid fragments remain. Placement and correlated failures determine whether the intended fault tolerance is realized.
45-minute interview rubric
- 00–05: scope object and object metadata version.
- 05–12: identify the limiting resource and derive the domain workload above, retaining units and assumptions.
- 12–28: draw object metadata version, numbered writes and reads.
- 28–40: challenge recovery: Separate placement, integrity and visibility transitions.
- 40–45: defend bucket placement, observations and remaining assumptions.
Go deeper
- What is Amazon S3? - Amazon Simple Storage Service · Primary document · docs.aws.amazon.com. Separate placement, integrity and visibility transitions. Verified 2026-10-26.
Decision log
Separate placement, integrity and visibility transitions.
Preserve object identity and object metadata version ownership.
Revisit changed workload, observations or recovery objectives.