1 · Front door
DNS maps the site name to an address. A CDN can serve static files near the client.
Interactive diagram · architecture
DNS maps the site name to an address. A CDN can serve static files near the client.
A load balancer spreads traffic across web servers. The web layer routes the request to the right application API.
Read, write, and asynchronous APIs separate work that scales differently. Each API has one clear next hop.
A queue holds slow work until a worker can pull it. That keeps long-running jobs off the request path.
Read requests check memory first. Read replicas take pressure off the SQL writer when the cache misses.
The write database replicates to readers, while object storage and split databases scale data handling.
The person or program making a request.
It starts by resolving a name or requesting static content. Dynamic HTTPS traffic continues to the Load Balancer.
Clients depend on DNS; a DNS outage can stop access even when servers are running.
DNS translates a domain name to an IP address.
It receives the client lookup and tells the client where to connect. The client can then reach the CDN or Load Balancer.
Accessing DNS adds a slight delay, though caching can reduce it.
A CDN is a distributed network of proxy servers that serves content close to users.
It receives static requests from the Client and serves or fetches files from Object Store. This keeps static work away from Web Server.
Content can be stale when it changes before its TTL expires.
A load balancer distributes incoming requests across computing resources.
It receives HTTPS traffic from the Client and sends it to Web Server instances. Multiple instances avoid one machine carrying all traffic.
A load balancer can become a bottleneck if it lacks resources or is configured poorly.
A reverse proxy centralizes internal services behind one public interface.
It receives traffic from Load Balancer and routes it to the APIs. It can also serve cached or static content.
A single reverse proxy is a single point of failure; failover adds complexity.
A worker runs jobs outside the request path.
It pulls a job from Queue and can update NoSQL or store output in Object Store. This keeps slow work away from the client request.
Queues can add delays and complexity.
A message queue receives, holds, and delivers jobs.
Write API Async enqueues work here. Worker Service pulls the next job and processes it in the background.
Queues can add delays and complexity.
An application API that accepts work that can finish later.
It receives work from Web Server and hands a job to Queue. Worker Service handles that job outside the request.
Queues add delays and complexity for work that would be inexpensive to run synchronously.
An application API that handles writes.
It receives write requests from Web Server and sends changes to SQL Write Master–Slave. It can also store files in Object Store.
Loosely coupled services add deployment and operations complexity.
An application API that handles reads.
It receives requests from Web Server and checks Memory Cache first. On a miss it reads from SQL Read Replicas.
Loosely coupled services add deployment and operations complexity.
An in-memory cache holds key-value data in RAM.
Read API checks it first. On a miss, Read API reads from SQL Read Replicas instead. This takes load off the database.
Cache invalidation is difficult and adds complexity.
A NoSQL database stores data outside the relational model.
Worker Service can update it after pulling a job from Queue. It accepts data that does not need the SQL write path.
NoSQL systems often trade strong consistency for availability or partition tolerance.
A master serves writes and replicates them to slaves.
Write API sends writes here. Changes replicate to SQL Read Replicas, which serve read traffic.
A master failure before replication can cause data loss.
Read replicas serve reads after changes are copied from the write master.
Read API sends cache misses here. The replicas reduce load on SQL Write Master–Slave.
More replicas can mean greater replication lag.
Object storage keeps static files separately from application servers.
CDN serves static files from it, while Write API and Worker Service can store new files there. This removes that content from Web Server storage.
Separate storage increases complexity and requires application changes.
Sharding distributes one data set across databases, each holding a subset.
Customers A–M and Customers N–Z show a split by data range. Application logic chooses the shard for each read and write.
You need to update application logic to determine which shard to read and write.
Federation splits databases by function.
Customers SQL and Products SQL keep different functions separate. The application chooses the database for each operation.
Joining data from two databases is more complex.
Detail · follows playback, or click any box or step to pin it
Close · follow playbackClick any box for an explanation, or use Next or Play to walk through the six steps.
DNS maps the site name to an address. A CDN can serve static files near the client.
The client enters through DNS or the CDN.
A load balancer spreads traffic across web servers. The web layer routes the request to the right application API.
Requests are distributed before they reach the application.
Read, write, and asynchronous APIs separate work that scales differently. Each API has one clear next hop.
The API layer separates read, write, and deferred work.
A queue holds slow work until a worker can pull it. That keeps long-running jobs off the request path.
Queued work is processed without blocking the request.
Read requests check memory first. Read replicas take pressure off the SQL writer when the cache misses.
The read path favors memory and then replicas.
The write database replicates to readers, while object storage and split databases scale data handling.
Storage patterns keep growing data manageable.