Library / Blogs
Waymo Blog
The latest news, updates, and stories from Waymo.
By Waymo engineers · Waymo · Added 2026-10-12
All content belongs to Waymo engineers / Waymo. We only link to it and give credit. Report a problem
Learn this article
About 37 min left. Your work is saved as you go.
What you are about to study
Waymo wrote this to explain how they thought about a problem. You should know the basics: caching, queues and replication.
Ideas you will meet
- Distributed Systems
- Consensus, time, failure and the fundamentals of scale-out.
What we already know about this
Our own lessons on these ideas. Read them here before you start, so it makes sense.
Low-Level Design Practice · 10 minATM machineA machine that behaves differently in each state: the State pattern, card and PIN checks, and cash dispensing with limits.Read here
The problem
An ATM accepts a card, checks the PIN, then lets the customer check balance, withdraw cash or deposit, and returns the card. It talks to a bank to authorise operations and holds a limited amount of cash.
States
100%Figure SDA-LLD-06-1 · ATM states · © forcsguy.com
In
Idle, "enter PIN" makes no sense; inAuthenticated, "insert card" makes no sense. The State pattern puts those rules inside state objects instead ofif (state === ...)chains.interface AtmState { insertCard(atm: Atm, card: Card): void; enterPin(atm: Atm, pin: string): void; withdraw(atm: Atm, cents: number): void; } class Idle implements AtmState { insertCard(atm, card) { atm.card = card; atm.setState(new HasCard()); } enterPin() { throw new Error("insert a card first"); } withdraw() { throw new Error("insert a card first"); } } class HasCard implements AtmState { tries = 0; insertCard() { throw new Error("card already inserted"); } enterPin(atm, pin) { if (atm.bank.checkPin(atm.card!, pin)) atm.setState(new Authenticated()); else if (++this.tries >= 3) { atm.retainOrEject(); atm.setState(new Idle()); } } withdraw() { throw new Error("enter the PIN first"); } }Who is responsible for what
100%Figure SDA-LLD-06-2 · Withdrawal sequence · © forcsguy.com
- Bank owns the balance and account rules. ATM owns hardware, cash on hand and the session.
- Cash dispenser holds counts per denomination and decides which notes to give (greedy from the largest, with a fallback).
- Every step is logged so a failure between "dispensed" and "confirmed" can be reconciled later (a mismatch report, or an automatic reversal).
Design notes
- Treat PINs as secrets: never store or log them; the bank verifies, the ATM only forwards an encrypted PIN block.
- Idempotency: a retried authorise call must not debit twice; use a transaction id.
- Timeouts: an idle session returns to
Idleand ejects the card. - Extensions: deposits (count and hold until verified), fund transfers, receipts, and multiple card types.
Real-world reading
Related reading
- Apple Machine Learning BlogApple engineers · AppleBlogs
- AWS Machine Learning BlogAmazon Web Services engineers · Amazon Web ServicesBlogs
- Optimizing Payments with Machine Learning at DropboxDropbox engineers · DropboxCase Studies
- Machine Learning Platform at YelpYelp engineers · YelpCase Studies
Show 6 moreShow fewer
- PyKrylov: Accelerating Machine Learning Research at eBayeBay engineers · eBayCase Studies
- Machine Learning (2 parts) at Condé NastCondé Nast engineers · Condé NastCase Studies
- Machine Learning Platform at ZalandoZalando engineers · ZalandoCase Studies
- Secret Detector: Preventing Secrets in Source Code at YelpYelp engineers · YelpCase Studies
- Machine Learning at Jane StreetJane Street engineers · Jane StreetCase Studies
- Waymo BlogWaymo engineers · WaymoBlogs
Go deeper on this
A path through videos, articles, other case studies and code on the same ideas as Waymo Blog.
Warm upGet the vocabulary first.
Books · Free from the author
Concurrent and Distributed Systems (Cambridge lecture notes)
Eight lectures on time, broadcast, replication, consensus and transactions, with notes, slides and video. Free from the author under CC BY-SA.
University of CambridgeIntermediate
Books · Free from the author
Computer Networks: A Systems Approach
How networks are built and why: protocols, routing, congestion control and the internet's architecture. The authors publish it free online under CC BY 4.0.
Systems ApproachIntermediate
WatchHow others solve the same problem, on video.
Videos belong to their creators and play from YouTube. More on YouTube (opens in a new tab)
ReadEngineers explain it in their own words.
Blogs · Free from the author · Read here
Scalable Web Architecture and Distributed Systems
A full chapter on the building blocks of large websites: availability, performance, reliability, scalability, caches, proxies, indexes, load balancers and queues. Free to read here under CC BY 3.0.
The Architecture of Open Source ApplicationsBeginner40 min
Papers · Read here
Facebook’s photo storage
This paper describes Haystack, an object storage system optimized for Facebook’s Photos application. Facebook currently stores over 260 billion images, which translates to over 20 petabytes of data.
USENIXIntermediate
See it in another companyThe same ideas, a different system.
Case Studies · Read here
Aroma: Using ML for Code Recommendation at Facebook
Thousands of engineers write the code to create our apps, which serve billions of people worldwide. This is no trivial task—our services have grown so diverse and complex that the codebase contains…
FacebookIntermediate
Case Studies · Read here
Brooklin: Distributed Service for Near Real-Time Data Streaming at LinkedIn
Brooklin—a distributed service for streaming data in near real-time and at scale—has been running in production at LinkedIn since 2016, powering thousands of data streams and over 2 trillion messages per day. Today, w...
LinkedInIntermediate
Read the codeSee how it looks when it is real.
GitHub
Engineering Blogs
A huge directory of company engineering blogs to learn from real production systems.
kilimchoiIntermediate
GitHub
Awesome Scalability
Curated reading list of articles on the architecture of scalable, reliable systems.
binhnguyennusIntermediate
Keep learning
Loading community…