Amazon system design interview: what Amazon publishes and how to answer
What Amazon says it evaluates in a design round, the techniques its engineers publish, the prompts candidates report, a worked checkout design, a tested C# stock ledger and an Amazon Locker design, and the senior follow-ups.
GuideAppliedAmazon guide22 min readUpdated
- 1 architecture diagram
- 1 sequence flow
- 3 data models
- 1 API design
- 4 code samples
- 6 interviewer follow-ups
- 4 self-checks
On this page12 sectionsHLDLLDSenior depth
Read first: A framework for system design interviews
- Separate what Amazon publishes about its design round and its engineering practice from the prompts candidates report, and use the reported prompts as themes, not a question bank.
- Design a checkout that survives retries, with idempotency keys, expiring stock holds and an outbox, and say what each one prevents.
- Write an Amazon Locker class design in C# with best-fit allocation, unique codes and expiry, and test it.
- Answer the senior follow-ups on payment uncertainty, retry storms, overload and shuffle sharding.
4 code samples (240 lines), collapsed so the explanation stays in focus.
Design prompts are easier to practise than to predict. Amazon helps more than most companies, because it publishes the criteria it uses and, through the Amazon Builders' Library, the techniques its own engineers rely on. This guide starts there, then lists what candidates say they were asked, and works two designs in full.
Amazon's careers site has preparation pages for software development engineer (SDE) roles. Some are several years old, and what applies to you depends on level and team, so check your own preparation material.
| Amazon publishes | What to do with it |
|---|---|
| For SDE II, expect at least one question on software systems design | Prepare at least three complete designs and say them aloud in 45 minutes. |
| The stated evaluation objectives are practicality, accuracy, efficiency, reliability, optimization and scalability | Use the six words as the checklist for the last five minutes. The next section shows how. |
| Ask clarifying questions before you start. Many candidates jump straight to a solution | Spend the first five minutes on users, scale, and what is out of scope. |
| Object-oriented design, databases and distributed computing are on the SDE topic list | Prepare a class design as well as a system design. The locker below is one. |
| Amazon's engineers publish how they build, in the Amazon Builders' Library | Name the technique and the failure it prevents. The table below lists the ones this guide uses. |
Amazon lists these six words as what a design is evaluated on. How to apply them is our reading: ask each question of the design you just drew, out loud, and say which one you traded away.
| Amazon's word | Ask of your design | Where it shows up below |
|---|---|---|
| Practicality | Could a team build and run this next quarter? | An ordinary relational store and a queue, not exotic parts |
| Accuracy | Can it give a wrong answer, and when? | Stock holds never oversell, and the idempotency key never charges twice |
| Efficiency | Where do work and money go as load grows? | Holds expire on a schedule instead of being polled, and read-mostly data is cached |
| Reliability | What happens when each part fails or is slow? | Timeouts, retries with jitter, the outbox, reconciliation |
| Optimization | What would you measure and tune first? | Contention on a hot item, and checkout latency at the 99th percentile |
| Scalability | What breaks at ten times the load, and what do you do? | Partitioning by customer, shedding load, shuffle sharding |
The Amazon Builders' Library is a set of articles by Amazon engineers. These are the ones this guide uses, and what each says in one line.
| Article | The idea |
|---|---|
| Timeouts, retries, and backoff with jitter (opens in a new tab) | Retries help with brief failures and add load to a system that is already overloaded, so back off, add jitter and cap the attempts. Retries stack across layers: five layers that each try three times can multiply the load on the bottom service 243 times. An API with side effects should be retried only if it is idempotent, for example with an idempotency token. |
| Resilience lessons from the lunch rush (opens in a new tab) | Shed load to protect useful work, goodput, during a spike, and give retries a quota, a token bucket, so they cannot swamp a recovering service. |
| Workload isolation using shuffle-sharding (opens in a new tab) | Give each customer a small random subset of the workers so one bad customer affects few others. For Route 53, each customer domain gets 4 of 2,048 virtual name servers, roughly 730 billion possible combinations. |
| Avoiding overload in distributed systems by putting the smaller service in control (opens in a new tab) | A data plane can keep running on its last known configuration if its control plane goes down. That is static stability. |
| Using dependency isolation to contain concurrency overload (opens in a new tab) | Tuning timeouts and retries alone is unlikely to stop a service running out of concurrency, so isolate each dependency's share of it. |
Candidate posts and prep-site lists name prompts like these. First-hand posts are evidence of what one person was asked. Prep-site lists are guesses, which makes them good practice and weak evidence. Amazon's loops, as candidates describe them, often mix high-level design, low-level design and data structures.
| Prompt, as reported | Reported by | What it really tests | Start from |
|---|---|---|---|
| Amazon Locker | Several candidate accounts, low-level design | Class design, allocation, state and time | Worked below |
| A parking lot | Candidate accounts, low-level design | Classes, vehicle types, spot allocation, pricing | The same shape as the locker: give each vehicle the smallest free spot that fits |
| A quick-commerce system | A 2025 candidate list for SDE II | Orders, inventory and delivery under time pressure | The checkout design below |
| Splitwise, shared expenses | The same list | Data model, balances, simplifying debts | Class design, as in the locker |
| A rate limiter, at the code level | The same list | Algorithms and concurrency | Rate limiting |
One candidate said a system design prompt was no different from a distributed parking lot, and another noted that the Locker prompt was a single sentence, with the requirements left for the candidate to ask about. Both are reminders that the first five minutes are part of the answer.
Three prompts of ours, not reported by anyone, practise the same ideas: a checkout that survives retries (below), a shopping cart that merges across devices, and an order tracker that sends updates to millions of phones.
A checkout, designed from the requirements up. This is our design for practice, not Amazon's architecture.
Requirements. A customer places an order for items that are in stock and pays once. If the app or the network retries, nothing happens twice. An item is never sold more times than it exists. Confirmation reaches fulfilment and notifications. The slowness or failure of any one part must not leave an order half done.
Numbers. Illustrative, so the design has a scale to be judged against. 5 million orders a day is about 58 a second on average, and perhaps 580 a second on a peak day ten times busier. Each order writes a few rows, so storage and throughput are modest. The hard parts here are correctness and failure, not size.
The decisions that matter, each with the failure it prevents:
- Idempotency key. The app makes one key per checkout attempt and sends it on every try. The order service claims the key in the same transaction that creates the order, and stores the response, so a replay returns the original answer. The same key with a different body is a conflict, not a replay. This prevents a double order when a response is lost. Amazon's retries article says that an API with side effects should be retried only if it is idempotent.
- Retries. Retry in one layer only, cap the attempts, back off exponentially and add jitter, so that a thousand clients do not retry on the same beat. Give retries a budget. Without these, retries stack: five layers of three attempts each is 243 times the load.
- Stock holds. Reserve stock with a hold that expires, and make the hold id the order id so a retry cannot hold twice. Confirm the hold after payment, release it on failure, and let it expire if the order stalls. This prevents overselling, and it prevents stock locked up by abandoned checkouts (the pattern is a saga step with an expiry; see distributed transactions).
- Payment uncertainty. A timeout from the payment service means "unknown", not "failed". Do not release the stock and mark the order failed. Call the provider again with the same payment id, which is also idempotent, or leave the order pending and let a reconciler ask the provider. This prevents charging a customer for an order you cancelled.
- Outbox. Write the "order confirmed" event to a table in the same transaction as the order, and let a relay publish it. If you publish straight to the queue after committing, a crash between the two loses the event. Consumers dedupe on the order id, because delivery is at least once.
- Load shedding. When the service is overloaded, reject cheap and early with a 429 and a
Retry-After, and protect checkout before browsing. Amazon describes this as protecting goodput: the work that matters keeps completing. - Static stability. Checkout should not need a live call to anything optional. Keep the last known prices and promotions, and drop recommendations rather than fail the order.
order_iduuid
PKcustomer_idbigint
partition key, so one customer's orders sit together
statustext
pending, confirmed or cancelled
total_centsbigint
placed_attimestamp
A status only moves forward. Every update is conditional on the current status, so a late or repeated message cannot move it back.
customer_idbigint
PKkeytext
the Idempotency-Key header
PKrequest_hashtext
the same key with a different body is an error, not a replay
order_iduuid
responsetext
what we returned, so a replay returns the same thing
expires_attimestamp
kept for a day or two, then deleted
hold_idtext
the order id, so a retry cannot hold twice
PKskutext
INDEXquantityint
expires_attimestamp
an expired hold gives the stock back
- auth
- bearer token
- idempotency
- Idempotency-Key header, required. The same key returns the original response.
- body
- { "items": [{ "sku": "kettle", "quantity": 1 }], "payment_method": "pm_123" }
- 201confirmed, returns { "order_id": "...", "status": "confirmed" }
- 202accepted and still being processed, poll the order
- 402payment declined
- 409the key was used with a different request body
- 422an item is out of stock
- 429too many requests, retry after the Retry-After header
The inventory service's core is a ledger of available stock and holds. Four rules make it safe: TryHold is idempotent for the same hold id, it checks and takes stock in one step under a lock, Confirm and Release are safe to repeat or to race, and a hold that expires gives the stock back. The clock is passed in, so expiry can be tested without waiting. For a real service the lock becomes a conditional write in the database (the patterns are in transactions and isolation levels), and the sweep becomes a query on an expiry index or a delay queue.
C# · StockLedger, Hold
using System;
using System.Collections.Generic;
using System.Linq;
public sealed class StockLedger
{
private readonly object _gate = new();
private readonly Dictionary<string, int> _available = new();
private readonly Dictionary<string, Hold> _holds = new();
private readonly HashSet<string> _confirmed = new();
private readonly Func<DateTime> _now;
private sealed record Hold(string Sku, int Quantity, DateTime ExpiresAt);
public StockLedger(Func<DateTime> now) { _now = now; }
public void Receive(string sku, int quantity)
{
lock (_gate) _available[sku] = _available.GetValueOrDefault(sku) + quantity;
}
public int Available(string sku)
{
lock (_gate) { Sweep(); return _available.GetValueOrDefault(sku); }
}
/// <summary>Reserves stock for one order. Asking again with the same hold id changes nothing and says yes again.</summary>
public bool TryHold(string holdId, string sku, int quantity, TimeSpan timeToLive)
{
lock (_gate)
{
Sweep();
if (_holds.ContainsKey(holdId) || _confirmed.Contains(holdId)) return true;
if (_available.GetValueOrDefault(sku) < quantity) return false;
_available[sku] -= quantity;
_holds[holdId] = new Hold(sku, quantity, _now() + timeToLive);
return true;
}
}
/// <summary>The sale goes through: the held stock is gone for good. False if the hold already expired.</summary>
public bool Confirm(string holdId)
{
lock (_gate)
{
Sweep();
if (_confirmed.Contains(holdId)) return true;
if (!_holds.Remove(holdId)) return false;
_confirmed.Add(holdId);
return true;
}
}
/// <summary>The order was cancelled or payment failed: the stock goes back on sale. A confirmed sale cannot be released.</summary>
public bool Release(string holdId)
{
lock (_gate)
{
if (!_holds.Remove(holdId, out Hold hold)) return false;
_available[hold.Sku] += hold.Quantity;
return true;
}
}
private void Sweep()
{
DateTime now = _now();
foreach (var pair in _holds.Where(p => p.Value.ExpiresAt <= now).ToList())
{
_holds.Remove(pair.Key);
_available[pair.Value.Sku] += pair.Value.Quantity;
}
}
}The tests cover the retry, the confirm-twice case, a hold that expires, and the case that matters most: 500 callers racing for 10 units, in parallel, where exactly 10 must win.
C#
using System;
using System.Diagnostics;
using System.Threading;
using System.Threading.Tasks;
var clock = new DateTime(2026, 1, 1, 12, 0, 0, DateTimeKind.Utc);
var ledger = new StockLedger(() => clock);
ledger.Receive("kettle", 10);
bool first = ledger.TryHold("order-1", "kettle", 4, TimeSpan.FromMinutes(10));
bool retry = ledger.TryHold("order-1", "kettle", 4, TimeSpan.FromMinutes(10));
Debug.Assert(first && retry && ledger.Available("kettle") == 6); // the retry held nothing more
Debug.Assert(ledger.Release("order-1") && ledger.Available("kettle") == 10);
Debug.Assert(!ledger.Release("order-1"));
Debug.Assert(ledger.TryHold("order-2", "kettle", 3, TimeSpan.FromMinutes(10)));
bool confirmed = ledger.Confirm("order-2");
bool confirmedAgain = ledger.Confirm("order-2");
Debug.Assert(confirmed && confirmedAgain); // confirming twice is safe
Debug.Assert(!ledger.Release("order-2") && ledger.Available("kettle") == 7); // a sold item cannot be released
Debug.Assert(ledger.TryHold("order-3", "kettle", 5, TimeSpan.FromMinutes(10)) && ledger.Available("kettle") == 2);
clock = clock.AddMinutes(11); // the hold runs out
Debug.Assert(ledger.Available("kettle") == 7);
Debug.Assert(!ledger.Confirm("order-3")); // too late: the stock went back on sale
var busy = new StockLedger(() => clock);
busy.Receive("limited", 10);
int winners = 0;
Parallel.For(0, 500, i =>
{
if (busy.TryHold("order-" + i, "limited", 1, TimeSpan.FromMinutes(10))) Interlocked.Increment(ref winners);
});
Debug.Assert(winners == 10 && busy.Available("limited") == 0); // never oversold, however many competeCandidates report this as a class-design prompt, sometimes in a single sentence. The first five minutes are the requirements, so ask. A reasonable set: a locker has compartments of three sizes; a courier deposits a parcel and the system returns a pickup code; the customer enters the code to open the compartment; a parcel nobody collects within a few days is removed by staff.
The design. A Compartment has a size and holds at most one Parcel. The Locker owns the compartments and three decisions.
- Allocation. Give each parcel the smallest free compartment that fits. Best fit keeps large compartments free for large parcels. Scanning all compartments is O(c); keep a free list per size if c is large.
- Codes. A code must be unique among the parcels still inside, because the customer types only the code. Generate until it is unique. Codes should be random, not sequential, and a real kiosk locks out after a few wrong tries. The generator is passed in so a test can force a collision.
- Time. Each parcel has a deadline. The clock is passed in, so expiry is testable. An expired code stops working at once, and staff removal frees the compartment.
C# · Size, Parcel, Compartment, …
using System;
using System.Collections.Generic;
using System.Linq;
public enum Size { Small = 1, Medium = 2, Large = 3 }
public sealed record Parcel(string Id, Size Size);
public sealed class Compartment
{
public int Id { get; }
public Size Size { get; }
public Parcel Parcel { get; set; }
public Compartment(int id, Size size) { Id = id; Size = size; }
}
public sealed class Locker
{
private sealed record Assignment(Compartment Slot, DateTime ExpiresAt);
private readonly List<Compartment> _compartments;
private readonly Func<string> _newCode;
private readonly Func<DateTime> _now;
private readonly TimeSpan _holdFor;
private readonly Dictionary<string, Assignment> _byCode = new();
public Locker(IEnumerable<Compartment> compartments, Func<string> newCode, Func<DateTime> now, TimeSpan holdFor)
{
_compartments = compartments.ToList();
_newCode = newCode;
_now = now;
_holdFor = holdFor;
}
/// <summary>Drop-off: the smallest free compartment that fits. Returns the pickup code, or null if nothing fits.</summary>
public string Deposit(Parcel parcel)
{
Compartment best = null;
foreach (Compartment c in _compartments)
if (c.Parcel == null && c.Size >= parcel.Size && (best == null || c.Size < best.Size)) best = c;
if (best == null) return null;
string code;
do code = _newCode(); while (_byCode.ContainsKey(code)); // unique among parcels still inside
best.Parcel = parcel;
_byCode[code] = new Assignment(best, _now() + _holdFor);
return code;
}
/// <summary>Pickup: the right code, before the deadline. Returns the compartment to open, or -1.</summary>
public int Pickup(string code)
{
if (!_byCode.TryGetValue(code, out Assignment a) || a.ExpiresAt <= _now()) return -1;
_byCode.Remove(code);
a.Slot.Parcel = null;
return a.Slot.Id;
}
/// <summary>Staff removal of parcels nobody collected in time: frees their compartments and returns their ids.</summary>
public IReadOnlyList<string> ExpireOverdue()
{
var removed = new List<string>();
foreach (var pair in _byCode.Where(p => p.Value.ExpiresAt <= _now()).ToList())
{
removed.Add(pair.Value.Slot.Parcel.Id);
pair.Value.Slot.Parcel = null;
_byCode.Remove(pair.Key);
}
return removed;
}
public int CompartmentOf(string parcelId) => _compartments.FirstOrDefault(c => c.Parcel?.Id == parcelId)?.Id ?? -1;
public Size SizeOfCompartmentHolding(string parcelId) => _compartments.First(c => c.Parcel?.Id == parcelId).Size;
public int Occupied() => _compartments.Count(c => c.Parcel != null);
}The first test walks one locker through a day: best-fit allocation, a repeated code that must be skipped, wrong and reused codes, a freed slot being reused, and expiry. The second runs 4,000 random deposits and pickups and checks the invariants that must always hold: no parcel in a too-small compartment, no two live parcels sharing a code, and one parcel per compartment.
C#
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
var shelfTime = new DateTime(2026, 1, 1, 9, 0, 0, DateTimeKind.Utc);
var codes = new Queue<string>(new[] { "111111", "111111", "222222", "333333", "444444", "555555", "666666" });
var locker = new Locker(
new[] { new Compartment(1, Size.Small), new Compartment(2, Size.Small), new Compartment(3, Size.Medium), new Compartment(4, Size.Large) },
() => codes.Dequeue(), () => shelfTime, TimeSpan.FromDays(3));
string codeOne = locker.Deposit(new Parcel("p1", Size.Small));
string codeTwo = locker.Deposit(new Parcel("p2", Size.Small));
Debug.Assert(codeOne == "111111" && codeTwo == "222222"); // the repeated code was skipped
Debug.Assert(locker.Deposit(new Parcel("p3", Size.Small)) == "333333"); // small slots are full: a medium one is used
Debug.Assert(locker.Deposit(new Parcel("p4", Size.Medium)) == "444444"); // medium is full: the large one is used
Debug.Assert(locker.CompartmentOf("p3") == 3 && locker.CompartmentOf("p4") == 4);
Debug.Assert(locker.Deposit(new Parcel("p5", Size.Small)) == null); // everything is taken
Debug.Assert(locker.Pickup("000000") == -1); // a wrong code
Debug.Assert(locker.Pickup("111111") == 1); // the right code opens compartment 1
Debug.Assert(locker.Pickup("111111") == -1); // a code works once
Debug.Assert(locker.Deposit(new Parcel("p6", Size.Small)) == "555555" && locker.CompartmentOf("p6") == 1); // the freed slot is reused
shelfTime = shelfTime.AddDays(4); // nobody collects in time
Debug.Assert(locker.Pickup("222222") == -1); // an expired code stops working
Debug.Assert(string.Join(",", locker.ExpireOverdue().OrderBy(id => id)) == "p2,p3,p4,p6");
Debug.Assert(locker.Deposit(new Parcel("p7", Size.Large)) == "666666" && locker.CompartmentOf("p7") == 4);
var dice = new Random(3);
var live = new Dictionary<string, string>(); // parcel id -> code
int serial = 0;
var busyLocker = new Locker(
Enumerable.Range(1, 12).Select(i => new Compartment(i, (Size)(1 + i % 3))),
() => dice.Next(0, 40).ToString("D6"), () => shelfTime, TimeSpan.FromDays(3));
for (int step = 0; step < 4000; step++)
{
if (dice.Next(3) > 0)
{
var wanted = (Size)dice.Next(1, 4);
string id = "x" + serial++;
string code = busyLocker.Deposit(new Parcel(id, wanted));
if (code != null)
{
live[id] = code;
Debug.Assert((int)busyLocker.SizeOfCompartmentHolding(id) >= (int)wanted); // never in a too-small slot
}
}
else if (live.Count > 0)
{
string id = live.Keys.ElementAt(dice.Next(live.Count));
Debug.Assert(busyLocker.Pickup(live[id]) > 0);
live.Remove(id);
}
Debug.Assert(live.Values.Distinct().Count() == live.Count); // no two live parcels share a code
Debug.Assert(busyLocker.Occupied() == live.Count); // exactly one parcel per occupied slot
}Interviewer follow-upL5The payment call timed out. Did the customer get charged?How to answer
You do not know, and the design must not pretend to. Mark the order pending, keep the stock hold, and ask the payment provider for the status using the same payment id, which is idempotent. If it says authorized, continue. If it says it never saw the request, retry or release the hold. If it still cannot say, a reconciler retries later. The one wrong move is to release the stock and tell the customer it failed while a charge may exist.
Interviewer follow-upL6How do you stop retries from making an outage worse?How to answer
Retry in one layer only, cap the attempts, and back off exponentially with jitter so clients spread out. Give retries a budget, such as a token bucket, so a failing dependency cannot be flooded by its own callers. Amazon's article notes that retries stack: five layers of three attempts each can multiply the load on the bottom service 243 times. Add load shedding on the server so that overload is rejected cheaply and early, and make the client treat a 429 or a Retry-After as an instruction.
Interviewer follow-upL6Peak traffic is twenty times normal. What do you protect, and what do you give up?How to answer
Protect the path that earns money and cannot be redone: checkout, payment and stock. Shed work in priority order, starting with what the customer will not miss, such as recommendations, and then expensive browse paths, using a rate limit per priority class. Serve the catalogue from caches and static copies. Keep the system statically stable: it should run on its last known configuration without calling a control plane. Rehearse it before the event, because load shedding that was never exercised tends to fail the first time it is needed.
Interviewer follow-upL6A thousand customers want the last ten units in the same second. What happens?How to answer
Each tries to take a hold, and the ledger decides in one atomic step per attempt, so exactly ten succeed and the rest are told the item is out of stock. Contention on one hot row is the cost: serialise on that item, keep the critical section tiny, and do not hold the lock across a call to another service. If the hot item is a real problem, split its stock into several buckets, each with its own counter, and try another bucket when one is empty. Say the trade: buckets spread the contention, and make "exactly zero left" harder to know.
Interviewer follow-upL7One availability zone fails. What must keep working without anyone doing anything?How to answer
Checkout must keep serving from the remaining zones using capacity that is already there, not capacity that needs to be created during the failure. That is static stability: it does not depend on a control-plane action, such as launching instances or reconfiguring routing, being available while the zone is impaired. In practice that means running enough spare capacity across zones in advance, health checks and routing that remove the failed zone automatically, and data replicated across zones with a clear rule for what happens to writes in flight.
Interviewer follow-upL7One customer sends requests that crash a worker every time. How do you stop it taking everyone down?How to answer
Give each customer a small shuffled subset of the workers instead of a fixed shard. With 8 workers and 2 per customer there are 28 possible pairs, 8 choose 2. A poisonous customer takes down its own two workers, and only customers who were given exactly the same pair lose both: about 1 in 28, or 3.6%, where 4 fixed shards of 2 workers would lose a quarter of all customers. Clients retry on the other worker of their pair, so most neighbours see a slowdown, not an outage. Amazon's Route 53 write-up applies the idea at scale: each customer domain gets 4 of 2,048 virtual name servers, roughly 730 billion combinations. The costs are that every client must retry across its subset, and that capacity planning is harder when no worker has a fixed role.
Amazon says what it evaluates in a design round, and its engineers publish how they build. Use practicality, accuracy, efficiency, reliability, optimization and scalability as your closing checklist, and name the technique and the failure it prevents: idempotency keys against double orders, expiring holds against overselling, an outbox against lost events, load shedding against overload, and shuffle sharding against one bad customer. Treat the reported prompts as themes: a locker, a parking lot, a quick-commerce system. Then practise answering the follow-up before it is asked.
Try answering out loud before you reveal each answer.
QuestionWhich parts of this guide are published by Amazon and which are reported by candidates?Reveal answer
Published: the six evaluation words, the advice to ask clarifying questions, the topic list, and the engineering techniques in the Builders' Library. Reported: the specific prompts such as Amazon Locker, a parking lot and a quick-commerce system, and how the loops mix design, class design and data structures. Treat reported details as anecdotes and confirm the structure with your recruiter.
QuestionWhy is a payment timeout "unknown" and not "failed", and what do you do about it?Reveal answer
The request may have succeeded before the response was lost, so releasing the stock and cancelling could leave a customer charged for nothing. Keep the order pending, ask the provider for the status using the same idempotent payment id, and reconcile later if it still cannot say.
QuestionWhy does the locker generate pickup codes until one is unique?Reveal answer
The customer enters only the code, so the code must identify exactly one parcel among those still inside. A collision would let one customer open another's compartment. Passing the generator in lets a test force a collision.
QuestionHow does shuffle sharding limit the damage from one bad customer?Reveal answer
Each customer is served by a small random subset of the workers, so a poisonous customer takes down only its own subset. Few other customers share the whole subset, and those who share only part of it keep a working worker. With 8 workers and pairs, about 1 in 28 customers is fully affected, instead of a quarter with fixed shards.
- Amazon Jobs, SDE II interview prep (opens in a new tab) and Software development interview topics (opens in a new tab). Some pages are several years old.
- Amazon Builders' Library, Timeouts, retries, and backoff with jitter (opens in a new tab), Resilience lessons from the lunch rush (opens in a new tab), Workload isolation using shuffle-sharding (opens in a new tab), Avoiding overload in distributed systems by putting the smaller service in control (opens in a new tab) and Using dependency isolation to contain concurrency overload (opens in a new tab).
- AWS Architecture Blog, Introducing the Amazon Builders' Library (opens in a new tab): the definition of static stability.
- Public candidate reports of the kind this guide draws on, anonymous and unverified: LeetCode Discuss, Amazon, system design, Amazon Locker system (opens in a new tab), Amazon HLD, LLD and DSA questions (opens in a new tab) and Amazon SDE 2 interview experience (opens in a new tab).