The System Design Newsletter

The System Design Newsletter

How Amazon S3 Achieves Strong Consistency Without Sacrificing 99.99% Availability 🌟

#79: Break Into Amazon S3 Architecture (4 Minutes)

Neo Kim's avatar
Neo Kim
Jul 29, 2025
∙ Paid

Get my system design playbook for FREE on newsletter signup:


This post outlines how AWS S3 achieves strong consistency. You will find references at the bottom of this page if you want to go deeper.

  • Share this post & I'll send you some rewards for the referrals.

Note: This post is based on my research and may differ from actual implementation.

Once upon a time, there was a data processing startup.

They convert raw data into a structured format.

Yet they had only a few customers.

So an on-premise server was enough.

S3 Strong Consistency

But one morning, they got a new customer with an extremely popular site.

This means massive data storage needs.

Yet their storage server had only limited capacity.

So they moved to Amazon Simple Storage Service (S3), an object storage.

It stores unstructured data without hierarchy.

High-Level Architecture of S3
High-Level Architecture of S3

S3 provides a REST API via the web server.

And stores metadata and file content separately for scale. It stores metadata of data objects in a key-value database.

Also it caches the metadata for low latency and high availability.

Strong Consistency vs Eventual Consistency
Strong Consistency vs Eventual Consistency

Although caching metadata offers performance, some requests might return an older version of metadata.

Because there could be network partitions in a distributed architecture. This means writes go to one cache partition, while reads go to another cache partition.

Thus causing eventual consistency.

But they need strong consistency in data processing for ordering and correctness.

While setting up extra app logic for strong consistency increases infrastructure complexity.

Onward.


CodeRabbit: Free AI Code Reviews in VS Code - Sponsor

CodeRabbit: AI Code Reviews in VS Code

CodeRabbit brings real-time, AI-powered code reviews straight into VS Code, Cursor, and Windsurf. It lets you:

  • Get contextual feedback on every commit, not just at the PR stage

  • Catch bugs, security flaws, and performance issues as you code

  • Apply AI-driven suggestions instantly to implement code changes

  • Do code reviews in your IDE for free and in your PR for a paid subscription

Install in VS Code for FREE


S3 Strong Consistency

It’s difficult to achieve strong consistency at scale without performance or availability tradeoffs.

So smart engineers at Amazon used simple ideas to solve this hard problem.

Here’s how:

1. Write Path

They update the metadata cache using the write-through pattern.

It means the write coordinator updates the cache first. Then updates the metadata store synchronously.

Thus reducing the risk of a stale cache.

How S3 Metadata Gets Updated
How S3 Metadata Gets Updated

Also they set up a separate service to track the cache freshness and called it Witness. It stores only the latest version of a data object and keeps it lightweight (in-memory) for low latency. While the write coordinator notifies the witness whenever there’s a metadata update.

Besides they introduced a transaction log in the metadata store. It tracks the order of operations and allows them to check if the cache is fresh.

Ready for the best part?

2. Read Path

Here’s the read request workflow:

  1. The server queries the cache.

  2. It then asks the witness to understand if the cache has the latest data.

  3. The server queries the metadata store only if the cache is stale.

Thus achieving strong consistency.

How S3 Metadata Gets Queried
How S3 Metadata Gets Queried

Put simply, they find out if the metadata cache is fresh using the witness. Think of the witness as a central observer of metadata changes and a checkpoint for reads.

This post is for paid subscribers

Already a paid subscriber? Sign in
© 2025 Neo Kim · Publisher Privacy
Substack · Privacy ∙ Terms ∙ Collection notice
Start your SubstackGet the app
Substack is the home for great culture