Patterns, companies and the systems we build, one narrated diagram at a time.
Translate a vendor's or legacy system's model into yours at one boundary, so their changes stop rippling through your code.
Give every client one front door that routes, combines and protects, so services stay private and simple.
Let the slow side set the pace: bound every buffer, signal demand upstream, and decide what happens when it is full.
Give each user experience its own thin backend, owned by the team that builds the client.
A few bits per item tell you an item is definitely not in a set, so you skip the expensive lookup.
Partition threads, connections and capacity so one failing dependency or tenant cannot sink the rest.
Read the cache, load from the database on a miss, and delete the key on every write.
Serve shared content from servers near users, let HTTP headers decide what is stored, and keep serving when the origin fails.
Split the whole stack into identical, independent cells behind a thin router, so one failure hurts one cell, not every customer.
Read the database's own change log and stream every insert, update and delete as an ordered event to keep copies fresh.
Stop calling what is failing; answer from a fallback; test before trusting again.
Put slow work on a queue and let a pool of workers each take the next message; scale on queue depth.
Put servers and keys on one ring so adding a server moves only a small share of keys.
Each consumer records what it relies on; the provider proves it still delivers before either side deploys.
Separate the model that changes data from the models that answer questions, and design for the lag between them.
Page through big lists by remembering where you stopped, not how many rows to skip.
One worker at a time across machines: an owned, expiring lock, and fencing tokens when correctness is at stake.
Write a long business process as ordinary code; an engine records every step so it resumes where it stopped.
Store every change as an event; rebuild state by replaying them, and keep the full history.
Producers append once to a durable, partitioned log; every consumer reads it at its own offset, and can replay.
Ship code dark, switch features on at runtime for chosen users, and switch them off without a deploy.
File locations by map cell so "what is near me" looks up a few cells instead of scanning the world.
When an optional part fails, serve a reduced but working answer instead of an error.
Make retries safe: the client labels each operation with a key and the server does it once, replaying the answer.
Let exactly one replica do the work: a renewable lease, a majority vote, and fencing tokens for the leader that comes back.
Commit the event with the change in one local transaction; a relay publishes it, at least once.
Publish once to a topic; the broker gives every subscriber its own copy, so new listeners never change the sender.
Give every caller its own budget, reject the excess early with 429, and keep one client from taking everyone's share.
Send writes to one primary, stream its log to read-only copies, and spread reads across them.
Retry brief faults, wait longer each time with randomness, and know when to stop.
Keep data consistent across services with local transactions and compensating actions instead of one distributed transaction.
Ship screen layouts from the server, rendered with native components the app already has.
Move TLS, retries and telemetry out of every service into a proxy beside it, run centrally by one control plane.
Split rows across databases by a shard key, so writes and storage can grow past one machine.
Replace a legacy system one slice at a time behind a routing facade, until the old one can be switched off.
Never wait forever: give every remote call a time limit, and pass one deadline down the chain.
Make one change commit in several databases at once: prepare and vote, then all commit or all abort.
Append each change to a sequential log and flush it before commit; apply to data pages later and redo after a crash.