interview-reps 0.4.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/content/CLAUDE.md +3 -1
- package/content/assessments/A01-library-desk/README.md +13 -0
- package/content/assessments/A01-library-desk/level-1.md +17 -0
- package/content/assessments/A01-library-desk/level-2.md +16 -0
- package/content/assessments/A01-library-desk/level-3.md +16 -0
- package/content/assessments/A01-library-desk/level-4.md +15 -0
- package/content/assessments/A02-ticket-counter/README.md +16 -0
- package/content/assessments/A02-ticket-counter/level-1.md +18 -0
- package/content/assessments/A02-ticket-counter/level-2.md +16 -0
- package/content/assessments/A02-ticket-counter/level-3.md +16 -0
- package/content/assessments/A02-ticket-counter/level-4.md +16 -0
- package/content/assessments/REVIEW.md +70 -0
- package/content/behavioral/QUESTIONS.md +44 -0
- package/content/behavioral/REVIEW.md +41 -4
- package/content/design/D13-video-streaming/README.md +21 -0
- package/content/design/D14-ticket-booking/README.md +20 -0
- package/content/design/D15-ad-click-aggregator/README.md +20 -0
- package/content/design/D16-distributed-key-value-store/README.md +21 -0
- package/content/design/D17-collaborative-document-editor/README.md +20 -0
- package/content/design/D18-ai-assistant-on-a-budget/README.md +21 -0
- package/content/design/D19-going-multi-region/README.md +20 -0
- package/content/design/D20-checkout-at-10x-load/README.md +20 -0
- package/content/design/D21-webhook-delivery/README.md +20 -0
- package/content/design/D22-game-leaderboard/README.md +20 -0
- package/content/design/D23-discovery-recommendations/README.md +21 -0
- package/content/design/D24-splitting-a-shared-database/README.md +20 -0
- package/content/design/REVIEW.md +22 -0
- package/dist/cli.mjs +2155 -675
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -5,6 +5,7 @@ The agent for a nextround hub. It's a small program that runs on your computer.
|
|
|
5
5
|
- Reviews your design, behavioral, product and coding practice with your own Claude Code or Codex.
|
|
6
6
|
- Writes your weekly coach report and suggests gap tags from interview debriefs.
|
|
7
7
|
- Reads a job link and suggests the company and role.
|
|
8
|
+
- Writes a company brief from the public web, using only your runner's own web search.
|
|
8
9
|
- Checks your private calendar feed for interview rounds.
|
|
9
10
|
- Syncs your applications with your Notion database.
|
|
10
11
|
|
package/content/CLAUDE.md
CHANGED
|
@@ -82,6 +82,8 @@ System design, behavioral and product practice use their own tags (`design:*`, `
|
|
|
82
82
|
|
|
83
83
|
The practice app (and, for product, the hub) writes these automatically. If you're asked to review one by hand ("review design D03", "review my answer to conflict-2", "review product P04"), follow `design/REVIEW.md`, `behavioral/REVIEW.md` or `product/REVIEW.md`, and save it in `.reps/design/reviews/`, `.reps/behavioral/reviews/` or `.reps/product/reviews/` with the header lines from `app/SPEC.md`. The same hard rules apply: never write the design, the story or the product answer for them; name the kind of gap and the question to ask themselves.
|
|
84
84
|
|
|
85
|
+
An online assessment project ("review assessment A01") follows `assessments/REVIEW.md` and is saved in `.reps/assessments/reviews/` as `Ann-YYYY-MM-DD-HHMM.md`. It uses the coding gap tags, so `pnpm stats` counts its gaps with the coding ones. Never rewrite the solution.
|
|
86
|
+
|
|
85
87
|
## Job applications and interview feedback
|
|
86
88
|
|
|
87
89
|
`.reps/jobs.json` holds the person's applications, interview rounds, debriefs and the feedback they logged. It is personal: never copy it, quote company names or feedback anywhere outside this machine, or put any of it in the repo. The one exception is the app's own Notion sync, which the person turns on in Settings and which sends only company, role, status, applied date, link and source to their own database. Never read or print `.reps/secrets.json`.
|
|
@@ -108,7 +110,7 @@ Don't run any problem tests.
|
|
|
108
110
|
2. **Last report's focus: did it work?** For each focus area the previous report set, compare its gap tags and metrics before and after that report. Call each one *fixed*, *improving* or *still open*. This is the feedback loop, so be honest.
|
|
109
111
|
3. **Top 2–3 gaps now.** Rank by how recent and how frequent, across coding, system design, behavioral, product and real interview feedback. Give the evidence for each: tag counts, which problems, and failure kinds from `failedRuns` (performance failures point to `pattern`).
|
|
110
112
|
4. **Where to put effort for the next 5–7 days.** Name the exact problems: due redos first, then new problems in the weakest pattern families. If an interview is scheduled, weight the plan toward that round's kind (design prompts, product prompts, behavioral competencies with no story). Add a daily target and one habit to practise from [THINKING.md](THINKING.md).
|
|
111
|
-
5. **Readiness and confidence.** Say how the computed `readiness` scores are trending, and whether the optional self-rated `confidence` agrees with them, in one or two plain sentences.
|
|
113
|
+
5. **Readiness and confidence.** Say how the computed `readiness` scores are trending, and whether the optional self-rated `confidence` agrees with them, in one or two plain sentences. In the hub, `stats.selfAssessment` (when present) lists up to three skills where the person's own 1–5 rating disagrees with practice; mention the biggest one.
|
|
112
114
|
|
|
113
115
|
Keep it short and specific, and use numbers. Never give solution hints for problems they haven't solved. Name the pattern family to practise, not how to solve a particular problem.
|
|
114
116
|
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# A01 · Library desk
|
|
2
|
+
|
|
3
|
+
Time: 90 min · Levels: 4
|
|
4
|
+
|
|
5
|
+
You're writing the system behind the lending desk of a small neighbourhood library: the books it holds,
|
|
6
|
+
the people who borrow them, and what happens when a book comes back late or someone is waiting for it.
|
|
7
|
+
|
|
8
|
+
Rules for every level:
|
|
9
|
+
|
|
10
|
+
- Everything happens through one class, `LibraryDesk`. Every method takes `at` first: the day it happens, counted in whole days since the library opened. Calls arrive in order, so `at` never goes down.
|
|
11
|
+
- Ids are strings you're given. A copy's id is its title's id, `#`, and its number: `dune#1`, `dune#2`…
|
|
12
|
+
- A method that can't do what's asked returns `false`, `null` or an empty list, as its level says. It never throws.
|
|
13
|
+
- Each level adds to the last. Earlier levels' tests keep running, so keep them passing as you go.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Level 1 · Lending
|
|
2
|
+
|
|
3
|
+
The desk can add books and members, lend copies out and take them back.
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
addTitle(at: number, titleId: string, copies: number): boolean
|
|
7
|
+
addMember(at: number, memberId: string): boolean
|
|
8
|
+
lend(at: number, memberId: string, titleId: string): string | null
|
|
9
|
+
giveBack(at: number, copyId: string): boolean
|
|
10
|
+
onLoan(at: number, memberId: string): string[]
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
- `addTitle` adds a title with copies numbered from 1. It returns `false` if the title already exists or `copies` is less than 1.
|
|
14
|
+
- `addMember` returns `false` if the member already exists.
|
|
15
|
+
- `lend` lends the lowest-numbered free copy and returns its id. It returns `null` if the member or the title is unknown, no copy is free, or the member already has a copy of that title.
|
|
16
|
+
- `giveBack` returns `false` if the copy doesn't exist or isn't on loan.
|
|
17
|
+
- `onLoan` lists the copies a member has, sorted. An unknown member has none.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Level 2 · Late fees and the overdue list
|
|
2
|
+
|
|
3
|
+
A loan is due 14 days after the day it was lent: lent on day 3, due on day 17. Bringing it back after the
|
|
4
|
+
due day costs a late fee.
|
|
5
|
+
|
|
6
|
+
```ts
|
|
7
|
+
feesOwed(at: number, memberId: string): number | null
|
|
8
|
+
pay(at: number, memberId: string, amount: number): number | null
|
|
9
|
+
overdueReport(at: number): string[]
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
- When a copy comes back late, the member is charged 25 for each day past the due day, at most 500 for one loan. Back on the due day or earlier costs nothing.
|
|
13
|
+
- `feesOwed` is what the member has been charged and not yet paid. Copies still out don't count until they come back. It returns `null` for an unknown member.
|
|
14
|
+
- `pay` takes up to `amount` off what's owed and returns what's left. Paying more than is owed leaves 0; the rest isn't kept. It returns `null` for an unknown member or an `amount` of 0 or less.
|
|
15
|
+
- A member who owes 300 or more can't borrow: `lend` returns `null` until they pay below 300.
|
|
16
|
+
- `overdueReport` lists every loan past its due day as `copyId,memberId,daysLate`, most days late first, then by copy id.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Level 3 · Holds and renewals
|
|
2
|
+
|
|
3
|
+
Members can now wait for a title that has no copy free, and keep a book longer.
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
placeHold(at: number, memberId: string, titleId: string): boolean
|
|
7
|
+
waiting(at: number, titleId: string): string[]
|
|
8
|
+
keptFor(at: number, copyId: string): string | null
|
|
9
|
+
renew(at: number, copyId: string): boolean
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
- `placeHold` puts the member at the back of the title's queue. It returns `false` if the member or title is unknown, a copy is free right now, or the member already has a copy or is already waiting.
|
|
13
|
+
- When a copy comes back and someone is waiting, it is kept for the first member in the queue, who leaves the queue. It's kept for them on the day it came back and the two days after. On the third day it moves to the next member waiting, kept on the same terms, or becomes free if nobody is.
|
|
14
|
+
- A kept copy can only be lent to the member it's kept for. `lend` gives them that copy even if a lower-numbered one is free. Other members can still borrow the title's free copies.
|
|
15
|
+
- `waiting` lists the members still in the queue, first first. `keptFor` says who a copy is kept for today, or `null`.
|
|
16
|
+
- `renew` moves the due day 14 days later. It returns `false` if the copy isn't on loan, the loan is already overdue, anyone is waiting for the title, or it has already been renewed twice.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Level 4 · Looking back
|
|
2
|
+
|
|
3
|
+
The library wants to answer questions about the past: who had a book on a given day, and what someone
|
|
4
|
+
owed then. A day's answer counts everything that happened on that day.
|
|
5
|
+
|
|
6
|
+
```ts
|
|
7
|
+
loansOn(at: number, day: number, memberId: string): string[]
|
|
8
|
+
heldBy(at: number, day: number, copyId: string): string | null
|
|
9
|
+
owedOn(at: number, day: number, memberId: string): number | null
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
- `loansOn` lists, sorted, the copies the member had at the end of `day`.
|
|
13
|
+
- `heldBy` says which member had the copy at the end of `day`, or `null`.
|
|
14
|
+
- `owedOn` is what the member owed at the end of `day`, after any fees and payments that day. It returns `null` if the member didn't exist yet.
|
|
15
|
+
- `day` is never after `at`. A day before the library knew a copy or member gives `null` or an empty list.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# A02 · Ticket counter
|
|
2
|
+
|
|
3
|
+
Time: 90 min · Levels: 4
|
|
4
|
+
|
|
5
|
+
You're writing the box office of a small venue that sells named seats for its shows: who sits where, what
|
|
6
|
+
each seat cost, seats held for a few days while someone decides, and what happens when a show moves to a
|
|
7
|
+
smaller room.
|
|
8
|
+
|
|
9
|
+
Rules for every level:
|
|
10
|
+
|
|
11
|
+
- Everything happens through one class, `TicketCounter`. Every method takes `at` first: the day it happens, counted in whole days since the box office opened. Calls arrive in order, so `at` never goes down.
|
|
12
|
+
- Show ids and buyer ids are strings you're given. All counts and prices are whole numbers.
|
|
13
|
+
- A show's seats are laid out in rows. Rows are lettered from `A` and seats in a row are numbered from 1, so `B7` is row B, seat 7.
|
|
14
|
+
- Seat order is by row letter, then by seat number as a number: `A2`, `A10`, `B1`.
|
|
15
|
+
- A method that can't do what's asked returns `false`, `null` or an empty list, as its level says. It never throws.
|
|
16
|
+
- Each level adds to the last. Earlier levels' tests keep running, so keep them passing as you go.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Level 1 · Shows and seats
|
|
2
|
+
|
|
3
|
+
The box office can put on shows, sell named seats and take them back.
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
addShow(at: number, showId: string, rows: number, seatsPerRow: number): boolean
|
|
7
|
+
sell(at: number, showId: string, seat: string, buyerId: string): boolean
|
|
8
|
+
refund(at: number, showId: string, seat: string): boolean
|
|
9
|
+
seatsOf(at: number, showId: string, buyerId: string): string[]
|
|
10
|
+
freeSeats(at: number, showId: string): number | null
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
- `addShow` adds a show with `rows` rows of `seatsPerRow` seats each. It returns `false` if the show already exists, `rows` is below 1 or above 26, or `seatsPerRow` is below 1.
|
|
14
|
+
- A seat is written as its capital row letter followed by its number with no leading zero, like `B7`. A label for a row or number the show doesn't have, or written any other way (`b7`, `B07`, `A0`), isn't one of its seats.
|
|
15
|
+
- `sell` sells one free seat to the buyer. It returns `false` if the show is unknown, the seat isn't one of its seats, or the seat is already sold. A seat can't be sold twice, even to the same buyer.
|
|
16
|
+
- `refund` takes a sold seat back, and it can then be sold again. It returns `false` if the show is unknown, the seat isn't one of its seats, or the seat isn't sold.
|
|
17
|
+
- `seatsOf` lists the seats the buyer has for that show, in seat order. A buyer with none, or an unknown show, gets `[]`.
|
|
18
|
+
- `freeSeats` is how many of the show's seats are free, or `null` for an unknown show.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Level 2 · Prices and revenue
|
|
2
|
+
|
|
3
|
+
Each row now has a price, and the venue wants to see what its shows have earned.
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
setRowPrice(at: number, showId: string, row: string, price: number): boolean
|
|
7
|
+
revenue(at: number, showId: string): number | null
|
|
8
|
+
topShows(at: number, n: number): string[]
|
|
9
|
+
exportSales(at: number, showId: string): string[]
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
- Every row starts at a price of 0. `setRowPrice` sets one row's price, given as its capital letter. It returns `false` for an unknown show, a row the show doesn't have, or a price below 0.
|
|
13
|
+
- A seat costs its row's price at the moment it's sold. Changing a price later doesn't change what earlier sales cost.
|
|
14
|
+
- `revenue` is the sum of what the show's currently sold seats were sold for. A refund gives back exactly what that seat was sold for, so it drops out of the revenue. It's `null` for an unknown show.
|
|
15
|
+
- `topShows` lists at most `n` shows as `showId(revenue)`, for example `hamlet(120)`, from the highest revenue to the lowest. Shows with equal revenue are listed in the order they were added, earliest first. Every show counts, even one with revenue 0.
|
|
16
|
+
- `exportSales` lists the show's sold seats in seat order, one line each as `seat,buyerId,price`, where `price` is what that seat was sold for: `A3,sam,40`. An unknown show gets `[]`.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Level 3 · Holds
|
|
2
|
+
|
|
3
|
+
A buyer can hold a seat for a few days before paying for it.
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
hold(at: number, showId: string, seat: string, buyerId: string): boolean
|
|
7
|
+
buyHold(at: number, showId: string, seat: string, buyerId: string): boolean
|
|
8
|
+
holds(at: number, showId: string): string[]
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
- `hold` holds a free seat for the buyer. It returns `false` if the show is unknown, the seat isn't one of its seats, or the seat is sold or already held, by anyone.
|
|
12
|
+
- A hold placed on day `d` expires on day `d + 3`: it still holds the seat on day `d + 2`, and from day `d + 3` the seat is free again without any call.
|
|
13
|
+
- While a seat is held, it isn't free: `freeSeats` doesn't count it, and `sell` and `hold` return `false` for it, even for the buyer holding it.
|
|
14
|
+
- `buyHold` sells a held seat to the buyer holding it, at its row's price on the day they buy, and ends the hold. It returns `false` if the show is unknown or that buyer has no live hold on that seat.
|
|
15
|
+
- A held seat isn't sold: `refund` returns `false` for it, and it isn't in `seatsOf`, `revenue` or `exportSales`.
|
|
16
|
+
- `holds` lists the show's live holds in seat order, one line each as `seat,buyerId,expiryDay`: `C2,ria,8` for a hold placed on day 5. An unknown show gets `[]`.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Level 4 · Moving to a smaller room
|
|
2
|
+
|
|
3
|
+
A show can move to a smaller seat map. People who already bought keep a seat if one is left for them, and keep paying what they paid.
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
shrink(at: number, showId: string, rows: number, seatsPerRow: number): string[] | null
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
- The new map must fit inside the old one: `rows` and `seatsPerRow` are each at least 1 and no more than the show has now. Otherwise, or for an unknown show, `shrink` returns `null` and changes nothing. A map the same size as the old one is allowed.
|
|
10
|
+
- All live holds on the show are cancelled by the move.
|
|
11
|
+
- A buyer whose seat still exists on the new map keeps that seat.
|
|
12
|
+
- Every other sold seat is re-seated in the order the seats were sold, earliest sale first. Each takes the lowest free seat on the new map in seat order.
|
|
13
|
+
- A seat's sale happens when `sell` or `buyHold` sells it. Re-seating doesn't change when it was sold, but a seat refunded and sold again counts from its new sale.
|
|
14
|
+
- When no free seat is left, every remaining sold seat is refunded and drops out of the revenue.
|
|
15
|
+
- `shrink` returns those refunds in the order the seats were sold, one line each as `seat,buyerId,price` with the seat they had before the move. It returns `[]` when everyone fits.
|
|
16
|
+
- A re-seated buyer keeps the price they paid, whatever their new row costs. Rows still on the map keep their prices for later sales.
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# Assessment review protocol
|
|
2
|
+
|
|
3
|
+
The protocol the automatic reviewer follows after a timed assessment project (and anyone reviewing one by
|
|
4
|
+
hand: "review assessment A01"). The person practises without AI help. A project is one class built up over
|
|
5
|
+
4 levels in 90 minutes, each level unlocking when every test so far passes. The review is about how the
|
|
6
|
+
code grew under the clock, not only whether it works. **Never write the solution, never show corrected or
|
|
7
|
+
restructured code, and never name the data structure or design that would fix a gap.** Name the KIND of
|
|
8
|
+
gap and the question they should ask themselves next time.
|
|
9
|
+
|
|
10
|
+
## Before writing
|
|
11
|
+
|
|
12
|
+
1. Read the project's README (the rules for every level) and each level's instructions up to the level
|
|
13
|
+
they reached.
|
|
14
|
+
2. Read the code as it stood when each level was cleared, and when that was, then the final code. Compare
|
|
15
|
+
them: what changed between levels is where refactoring shows.
|
|
16
|
+
3. Read the score, the parts per level and the last run's failing tests.
|
|
17
|
+
|
|
18
|
+
Do not run commands and do not write files: print the review only.
|
|
19
|
+
|
|
20
|
+
## Scores
|
|
21
|
+
|
|
22
|
+
Score each dimension 1 to 5, with a one-line reason that points at their own code (quote a line or a
|
|
23
|
+
name where it helps, never more than a few lines).
|
|
24
|
+
|
|
25
|
+
| Score | Meaning |
|
|
26
|
+
|---|---|
|
|
27
|
+
| 1 | Missing or getting in the way: it cost them levels or points. |
|
|
28
|
+
| 2 | Works, but would not survive the next level without a rewrite, or an interviewer would push back. |
|
|
29
|
+
| 3 | Solid: clear, and later levels fitted in without fighting the earlier code. |
|
|
30
|
+
| 4 | Strong: clean and deliberate, with only small things an interviewer would mention. |
|
|
31
|
+
| 5 | What a standout candidate shows: each level's change small and safe, and nothing to add. |
|
|
32
|
+
|
|
33
|
+
- **structure**: Are the state and the methods organised so each level's rules have one obvious home?
|
|
34
|
+
Are names clear, helpers small, and repeated lookups or checks written once?
|
|
35
|
+
- **refactoring**: Between snapshots, did they reshape earlier code when a new level needed it, or bolt
|
|
36
|
+
special cases on? Did a refactor break an earlier level's tests on the way?
|
|
37
|
+
- **correctness**: Rules read carefully: boundaries (the due day itself, a cap, "at most twice"),
|
|
38
|
+
refusals that return `false`, `null` or an empty list instead of throwing, and order of results.
|
|
39
|
+
- **pace**: Minutes per level against the 90 minutes. Did they move on at the right time, or sink time
|
|
40
|
+
into one level? Did they reach the later, heavier levels?
|
|
41
|
+
|
|
42
|
+
## Reply in this order, briefly
|
|
43
|
+
|
|
44
|
+
1. **Result**: the score, levels cleared, minutes used, and what the failing tests have in common (the
|
|
45
|
+
kind of rule they missed, never the fix).
|
|
46
|
+
2. **How the code grew**: one short paragraph per level reached, from the snapshots. Where did the
|
|
47
|
+
design help or fight the next level?
|
|
48
|
+
3. **Correctness**: rules or inputs the tests did not catch that would break it, named as a kind.
|
|
49
|
+
4. **Code quality**: naming, TypeScript idiom (types, `const`, no needless mutation of inputs), method
|
|
50
|
+
length, anything an interviewer reading the final code would comment on.
|
|
51
|
+
5. **Pace**: where the minutes went and one concrete change for next time.
|
|
52
|
+
6. **Verdict**: *solid* (reached level 3 or 4 with clean, steadily refactored code) or *redo*, with the
|
|
53
|
+
one thing to fix.
|
|
54
|
+
|
|
55
|
+
## Header lines
|
|
56
|
+
|
|
57
|
+
Start with these lines, flush left (the hub reads them):
|
|
58
|
+
|
|
59
|
+
```
|
|
60
|
+
# Assessment review Ann · <project name>
|
|
61
|
+
Project: Ann
|
|
62
|
+
Date: YYYY-MM-DD
|
|
63
|
+
Verdict: solid | redo
|
|
64
|
+
Scores: structure <1-5>, refactoring <1-5>, correctness <1-5>, pace <1-5>
|
|
65
|
+
Gaps: <comma-separated coding gap tags from CLAUDE.md, or none>
|
|
66
|
+
Next time: <one concrete habit for the next timed assessment>
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
Use only the coding gap tags from CLAUDE.md. `clarity` covers structure that made the code hard to change,
|
|
70
|
+
`speed` covers pace, and `understanding` covers a misread rule.
|
|
@@ -9,6 +9,10 @@ end of a section rather than in the middle.
|
|
|
9
9
|
`[product]` at the end of a line marks a question product managers are often asked. Anyone can answer it
|
|
10
10
|
from their own work; the practice page can filter to these.
|
|
11
11
|
|
|
12
|
+
`[senior]`, `[staff]`, `[principal]` or `[manager]` at the end of a line marks a question that assumes that
|
|
13
|
+
scope: senior and up, staff and up, principal, or people managers. Lines without one suit every level. The
|
|
14
|
+
hub suggests a labelled question only to people whose target fits it; anyone can still pick it.
|
|
15
|
+
|
|
12
16
|
## Ownership
|
|
13
17
|
|
|
14
18
|
- Tell me about a time you took responsibility for something nobody had asked you to own.
|
|
@@ -18,6 +22,11 @@ from their own work; the practice page can filter to these.
|
|
|
18
22
|
- Describe a time you cleaned up after a problem you did not cause.
|
|
19
23
|
- Tell me about something you were responsible for after it launched. What did you change once real people used it? [product]
|
|
20
24
|
- Describe a time you spotted a problem users were having that nobody was tracking. What did you do? [product]
|
|
25
|
+
- Tell me about a system or area you owned for the long term. How did you decide what to fix and what to leave alone? [senior]
|
|
26
|
+
- Describe a time you set the technical direction for work that several teams depended on. [staff]
|
|
27
|
+
- Tell me about a problem that sat between teams for a long time before you took it on. How did you get it resolved? [staff]
|
|
28
|
+
- Describe a time you were accountable for a result your team delivered but you did not build yourself. [manager]
|
|
29
|
+
- Tell me about a product area you owned end to end, including the numbers it was judged on. [senior] [product]
|
|
21
30
|
|
|
22
31
|
## Impact
|
|
23
32
|
|
|
@@ -28,6 +37,11 @@ from their own work; the practice page can filter to these.
|
|
|
28
37
|
- Describe a small change you made that had a bigger effect than expected.
|
|
29
38
|
- Tell me about a launch you measured. What did the numbers show, and what did you do next? [product]
|
|
30
39
|
- Describe a time you stopped work that was already under way. How did you decide? [product]
|
|
40
|
+
- Tell me about a technical decision of yours whose effect was still visible a year later. [senior]
|
|
41
|
+
- Describe work of yours that changed how a group beyond your own team builds or ships. [staff]
|
|
42
|
+
- Tell me about a multi-year bet you argued for. How did you know whether it was paying off? [principal]
|
|
43
|
+
- Describe how you improved your team's delivery without adding people. [manager]
|
|
44
|
+
- Tell me about a strategy you wrote that changed what several teams worked on. [staff] [product]
|
|
31
45
|
|
|
32
46
|
## Ambiguity
|
|
33
47
|
|
|
@@ -37,6 +51,10 @@ from their own work; the practice page can filter to these.
|
|
|
37
51
|
- Describe a problem nobody knew how to approach. How did you get started?
|
|
38
52
|
- Describe how you chose between several things people were asking for, with a recent example. [product]
|
|
39
53
|
- Tell me about a time what people asked for turned out to be different from what they needed. [product]
|
|
54
|
+
- Tell me about a time you turned a vague goal from leadership into a plan others could carry out. [senior]
|
|
55
|
+
- Describe a time you had to decide what a whole area should work on for the next year. [staff]
|
|
56
|
+
- Tell me about a problem where the hardest part was working out which problem to solve. [principal]
|
|
57
|
+
- Describe a time your team's priorities were unclear because leaders above you disagreed. What did you do? [manager]
|
|
40
58
|
|
|
41
59
|
## Collaboration
|
|
42
60
|
|
|
@@ -46,6 +64,10 @@ from their own work; the practice page can filter to these.
|
|
|
46
64
|
- Describe how you kept a group moving when people were working in different places or time zones.
|
|
47
65
|
- Describe how you worked with people from other disciplines, such as design, engineering or sales, to ship something. [product]
|
|
48
66
|
- Tell me about a time you had to explain a technical limit to someone non-technical, or a business need to an engineer. [product]
|
|
67
|
+
- Tell me about a time you designed something another team had to build on or maintain. [senior]
|
|
68
|
+
- Describe how you got several teams to adopt a shared technical standard that none of them owned. [staff]
|
|
69
|
+
- Tell me about a time you worked with a partner team whose manager had different goals from yours. [manager]
|
|
70
|
+
- Describe a trade-off you negotiated between engineering, design and business stakeholders. [senior] [product]
|
|
49
71
|
|
|
50
72
|
## Mentoring
|
|
51
73
|
|
|
@@ -54,6 +76,12 @@ from their own work; the practice page can filter to these.
|
|
|
54
76
|
- Tell me about a time you onboarded someone new. What did you do to speed it up?
|
|
55
77
|
- Describe a time you let someone else take the lead on something you could have done yourself.
|
|
56
78
|
- Describe a time you helped someone understand how decisions get made in your area. [product]
|
|
79
|
+
- Describe a time you sponsored someone for a promotion or a bigger role. What case did you make, and to whom? [senior]
|
|
80
|
+
- Describe how you raised the technical bar of a group you did not manage. [staff]
|
|
81
|
+
- Tell me about a hire you made. How did you decide, and how did it turn out? [manager]
|
|
82
|
+
- Describe a time you managed someone who was not meeting expectations. [manager]
|
|
83
|
+
- Tell me about a time you built a team, or reshaped one, around a new goal. [manager]
|
|
84
|
+
- Describe how you helped other senior engineers grow into staff-level work. [principal]
|
|
57
85
|
|
|
58
86
|
## Learning
|
|
59
87
|
|
|
@@ -63,6 +91,9 @@ from their own work; the practice page can filter to these.
|
|
|
63
91
|
- Describe how you keep your skills current, with a recent example.
|
|
64
92
|
- Tell me about a time talking to users or customers changed your mind. [product]
|
|
65
93
|
- Describe an experiment or test whose result surprised you. What did you do with it? [product]
|
|
94
|
+
- Describe how you decided which new technology your team should bet on, and how you checked the bet. [senior]
|
|
95
|
+
- Tell me about an incident after which you stopped that kind of problem across several teams, not just yours. [staff]
|
|
96
|
+
- Tell me about a time feedback from the people you manage changed how you manage. [manager]
|
|
66
97
|
|
|
67
98
|
## Conflict
|
|
68
99
|
|
|
@@ -73,6 +104,10 @@ from their own work; the practice page can filter to these.
|
|
|
73
104
|
- Tell me about a time you disagreed with your manager.
|
|
74
105
|
- Tell me about a time you turned down a request from a customer or another team. [product]
|
|
75
106
|
- Describe a time you disagreed with what the data seemed to say. [product]
|
|
107
|
+
- Describe a time you pushed back on a deadline or scope set by leadership. [senior]
|
|
108
|
+
- Tell me about a technical disagreement between two senior people that you helped settle. [staff]
|
|
109
|
+
- Tell me about a time you had to explain to your team a decision you disagreed with. [manager]
|
|
110
|
+
- Describe a time a stakeholder wanted something you believed would hurt users or the business. [senior] [product]
|
|
76
111
|
|
|
77
112
|
## Failure
|
|
78
113
|
|
|
@@ -82,6 +117,10 @@ from their own work; the practice page can filter to these.
|
|
|
82
117
|
- Describe a project that did not deliver what was hoped. What did you learn?
|
|
83
118
|
- Tell me about a decision you made that the results later showed was wrong. [product]
|
|
84
119
|
- Describe a time you shipped too early or too late. What would you change? [product]
|
|
120
|
+
- Tell me about a design or architecture decision of yours that did not hold up. What did it cost? [senior]
|
|
121
|
+
- Describe a project you led that was cancelled or failed. How did you wind it down? [staff]
|
|
122
|
+
- Tell me about a hiring or people decision you got wrong. What did you do once you saw it? [manager]
|
|
123
|
+
- Describe a strategy or roadmap bet of yours that missed. What did you change afterwards? [staff] [product]
|
|
85
124
|
|
|
86
125
|
## Influence
|
|
87
126
|
|
|
@@ -91,3 +130,8 @@ from their own work; the practice page can filter to these.
|
|
|
91
130
|
- Describe a time you tried to persuade people and did not succeed. What did you take from it?
|
|
92
131
|
- Describe a time you got several teams to agree on priorities. [product]
|
|
93
132
|
- Tell me about a time you used data to change someone's mind. [product]
|
|
133
|
+
- Describe a time you made the case for a large investment, such as a rewrite, a migration or a new platform. [staff]
|
|
134
|
+
- Tell me about a time you influenced the roadmap of a team you had no part in. [staff]
|
|
135
|
+
- Describe how you set a technical vision that people outside your organisation adopted. [principal]
|
|
136
|
+
- Tell me about a time you represented your team's needs to senior leadership and changed an outcome. [manager]
|
|
137
|
+
- Describe a time you won support from executives for a product direction. [senior] [product]
|
|
@@ -49,15 +49,39 @@ Give each a one-line reason that points at the answer itself.
|
|
|
49
49
|
Also check that the story actually answers the question and shows its competency. A "conflict" story with
|
|
50
50
|
no disagreement in it does not.
|
|
51
51
|
|
|
52
|
+
## Level bar (when the app gives a target)
|
|
53
|
+
|
|
54
|
+
Some answers come with a target, such as "staff engineer", "senior product manager" or "engineering manager".
|
|
55
|
+
Then also judge whether the story reaches that level's scope. Without a target, skip this section and the
|
|
56
|
+
Level shown line.
|
|
57
|
+
|
|
58
|
+
| Target | Scope a 4 on impact needs | Ownership looks like |
|
|
59
|
+
|---|---|---|
|
|
60
|
+
| Junior, mid | Their own task, done well, with a result for users or the team | A clear "I": what they decided inside the task |
|
|
61
|
+
| Senior | A project they led end to end; a result for the team's product, ideally measured | Trade-offs they weighed and chose; people they brought along |
|
|
62
|
+
| Staff | Beyond their team: other teams or the organisation changed what they build or how | They set a direction others followed, without authority |
|
|
63
|
+
| Principal | Company-wide or over several years; a bet that shaped strategy | They framed the problem that leadership then funded |
|
|
64
|
+
| Engineering manager | Results through people: delivery, hiring, growth, keeping people | Calls they made about people and priorities, and what they stopped |
|
|
65
|
+
| Product manager | Senior: one product area and its main metric. Staff or above: strategy across areas | The decision, the evidence for it, and what they said no to |
|
|
66
|
+
|
|
67
|
+
- If an otherwise good story falls below the target's scope, cap **impact** (or **ownership**, whichever
|
|
68
|
+
falls short) at 3, add `behavioral:scope`, and say in a "Level bar" part of the review which part of the
|
|
69
|
+
scope is missing.
|
|
70
|
+
- Never suggest a bigger story to tell or invent scope. Name the kind of gap, as everywhere else.
|
|
71
|
+
- Print the **Level shown** header line: the level the story actually shows (`junior`, `mid`, `senior`,
|
|
72
|
+
`staff`, `principal` or `manager`), then optionally ` — ` and a reason of at most 120 characters that
|
|
73
|
+
names the kind of gap without retelling the story.
|
|
74
|
+
|
|
52
75
|
## Verdict, gaps and Next time
|
|
53
76
|
|
|
54
77
|
- **Verdict:** `solid` only if no dimension is below 3. Otherwise `redo`.
|
|
55
78
|
- **Gaps:** use only these tags, comma-separated, or `none`:
|
|
56
79
|
`behavioral:structure`, `behavioral:specificity`, `behavioral:impact`, `behavioral:ownership`,
|
|
57
80
|
`behavioral:brevity`, `behavioral:self-awareness`, `behavioral:conflict`, `behavioral:failure`,
|
|
58
|
-
`behavioral:influence`, `communication`. Add a dimension's tag when it scored below 3. Use
|
|
81
|
+
`behavioral:influence`, `behavioral:scope`, `communication`. Add a dimension's tag when it scored below 3. Use
|
|
59
82
|
`behavioral:conflict`, `behavioral:failure` or `behavioral:influence` when a question on that
|
|
60
|
-
competency got a story that does not show it. Use `
|
|
83
|
+
competency got a story that does not show it. Use `behavioral:scope` when the story is below the
|
|
84
|
+
target's level (see Level bar). Use `communication` for unclear wording or jargon.
|
|
61
85
|
- **Next time:** one concrete habit for the next answer (for example "open the Result with a number"),
|
|
62
86
|
not a list, and not a rewritten answer.
|
|
63
87
|
|
|
@@ -72,6 +96,7 @@ Date: YYYY-MM-DD
|
|
|
72
96
|
Verdict: solid | redo
|
|
73
97
|
Scores: structure <1-4>, specificity <1-4>, impact <1-4>, ownership <1-4>, brevity <1-4>, self-awareness <1-4>
|
|
74
98
|
Gaps: <comma-separated tags, or none>
|
|
99
|
+
Level shown: <junior | mid | senior | staff | principal | manager> — <optional reason> (only with a target)
|
|
75
100
|
Next time: <one concrete habit>
|
|
76
101
|
```
|
|
77
102
|
|
|
@@ -81,6 +106,18 @@ Then, briefly:
|
|
|
81
106
|
2. **Does it answer the question?** One or two lines.
|
|
82
107
|
3. **Did last time's feedback stick?** Compare with the earlier reviews' gaps and Next time lines, or say
|
|
83
108
|
this is the first review.
|
|
84
|
-
4. **
|
|
85
|
-
|
|
109
|
+
4. **Level bar** (only with a target), in this form, which the app shows as a block:
|
|
110
|
+
|
|
111
|
+
```
|
|
112
|
+
## Level bar · <target, for example staff engineer>
|
|
113
|
+
- Shown: <a part of the target's scope the story shows>
|
|
114
|
+
- Not shown: <a part it does not show>
|
|
115
|
+
Capped: impact
|
|
116
|
+
<one or two sentences on which part is missing>
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
Use two to four `Shown` or `Not shown` lines taken from the target's row in the Level bar table. Add the
|
|
120
|
+
`Capped:` line (`impact` or `ownership`) only when you capped a score for scope.
|
|
121
|
+
5. **What an interviewer would ask next**: one or two follow-up questions they should be ready for.
|
|
122
|
+
6. **Communication: pacing and fillers** (spoken answers only): words per minute against the easy range,
|
|
86
123
|
the fillers that stood out, and one thing to try. Skip this for typed answers.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# D13 · Video streaming
|
|
2
|
+
|
|
3
|
+
Category: Media · Level: core · Time: 45 min
|
|
4
|
+
|
|
5
|
+
Build a video service where creators upload videos and viewers anywhere in the world watch them on phones, laptops and TVs. Playback should start quickly and keep going without pausing, even on a slow or patchy connection.
|
|
6
|
+
|
|
7
|
+
Before you design, find out how many videos are uploaded per day and how long they are, how many hours are watched per day, which devices and connection speeds must be supported, how soon after upload a video must be watchable, and how evenly views are spread across videos.
|
|
8
|
+
|
|
9
|
+
## If you ask
|
|
10
|
+
|
|
11
|
+
- About 500,000 new videos a day, averaging 8 minutes; uploads can be up to 10 GB.
|
|
12
|
+
- 1 billion hours watched per day. A small share of videos gets most of the views, and a new hit can go from zero to millions of views in an hour.
|
|
13
|
+
- Every video must play on everything from a 3G phone to a 4K TV, and playback should start within 2 seconds.
|
|
14
|
+
- A new upload should be watchable within 10 minutes. View counts may lag by a few minutes.
|
|
15
|
+
- Out of scope: live streaming, recommendations, comments and ads.
|
|
16
|
+
|
|
17
|
+
## Follow-ups
|
|
18
|
+
|
|
19
|
+
- Viewers in one country are cut off from your nearest servers for a day. What do they experience, and what changes?
|
|
20
|
+
- Creators now want to stream live, with viewers no more than 5 seconds behind. What changes?
|
|
21
|
+
- Storage costs are growing faster than revenue. What would you change about what is kept, and for how long?
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# D14 · Ticket booking
|
|
2
|
+
|
|
3
|
+
Category: Marketplace · Level: core · Time: 45 min
|
|
4
|
+
|
|
5
|
+
Design the booking system for concert and sports tickets. Fans look at a seating map, pick seats, and hold them for a few minutes while they pay. A seat must never be sold twice, and a seat whose hold runs out goes back on sale.
|
|
6
|
+
|
|
7
|
+
Before you design, find out how many events and seats there are, how much traffic arrives when a popular event goes on sale, how long a hold lasts, what happens when payment fails or is slow, and whether fans can choose exact seats or only a section.
|
|
8
|
+
|
|
9
|
+
## If you ask
|
|
10
|
+
|
|
11
|
+
- About 50,000 events on sale at any time, from small clubs to stadiums of 80,000 seats.
|
|
12
|
+
- When a big tour goes on sale, up to 2 million people try to buy the same 20,000 seats within the first ten minutes.
|
|
13
|
+
- A hold lasts 8 minutes. Up to 6 seats per order, and the seats in one order are all held or none are.
|
|
14
|
+
- The seating map may be a few seconds out of date, but a fan must never pay for a seat that someone else has.
|
|
15
|
+
- Out of scope: reselling between fans, pricing, and choosing who gets in first when demand is high.
|
|
16
|
+
|
|
17
|
+
## Follow-ups
|
|
18
|
+
|
|
19
|
+
- Bots grab holds on thousands of seats and let them expire, again and again. What changes?
|
|
20
|
+
- The same system now sells hotel rooms, where one booking holds a room for several nights in a row. What changes?
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# D15 · Ad click aggregator
|
|
2
|
+
|
|
3
|
+
Category: Data · Level: core · Time: 45 min
|
|
4
|
+
|
|
5
|
+
Build the system that counts clicks on ads. Advertisers watch clicks per ad per minute on a dashboard, and at the end of each day they are billed per click, so the billed numbers must be right and checkable later.
|
|
6
|
+
|
|
7
|
+
Before you design, find out how many clicks arrive per second at peak, how quickly the dashboard must reflect a click, which breakdowns advertisers want, how long the data is kept, and what counts as a click that should not be billed.
|
|
8
|
+
|
|
9
|
+
## If you ask
|
|
10
|
+
|
|
11
|
+
- About 10 billion clicks a day, peaking at 500,000 per second; 2 million active ads.
|
|
12
|
+
- The dashboard may be up to 1 minute behind. Billing totals are final once a day, and must match the raw clicks exactly.
|
|
13
|
+
- Advertisers filter by ad, campaign, country and device, at minute detail for 30 days and day detail for 2 years.
|
|
14
|
+
- Some clicks arrive late, up to an hour after they happened, from phones that were offline. The same click can also be sent twice.
|
|
15
|
+
- Out of scope: deciding which ad to show, and fraud scoring (another team flags fraudulent clicks after the fact).
|
|
16
|
+
|
|
17
|
+
## Follow-ups
|
|
18
|
+
|
|
19
|
+
- A bug double-counted every click from one region for three hours yesterday, and bills have already gone out. What happens next?
|
|
20
|
+
- Advertisers now want to see how many distinct people clicked, not just how many clicks there were. What changes?
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# D16 · Distributed key-value store
|
|
2
|
+
|
|
3
|
+
Category: Storage · Level: advanced · Time: 45 min
|
|
4
|
+
|
|
5
|
+
Design the storage system itself: a store that other teams use to read and write values by key, spread across hundreds of machines. It keeps working when machines fail, and each team chooses how up to date its reads need to be.
|
|
6
|
+
|
|
7
|
+
Before you design, find out how much data is stored and how large values are, how many reads and writes per second there are and in what mix, what happens when two writes to the same key race, how much downtime is acceptable, and whether data must survive the loss of a whole rack or data centre.
|
|
8
|
+
|
|
9
|
+
## If you ask
|
|
10
|
+
|
|
11
|
+
- About 500 TB in total, with keys under 100 bytes and values usually under 10 KB (never more than 1 MB).
|
|
12
|
+
- 2 million reads and 500,000 writes per second at peak, with a few keys far busier than the rest.
|
|
13
|
+
- The store runs in one region across three data centres, and must keep accepting reads and writes if one data centre is lost.
|
|
14
|
+
- Some teams need to read their own latest write every time; others accept reads that are a few seconds stale in exchange for speed.
|
|
15
|
+
- Out of scope: queries other than by key, transactions across several keys, and multiple regions.
|
|
16
|
+
|
|
17
|
+
## Follow-ups
|
|
18
|
+
|
|
19
|
+
- You need to add 50% more machines without slowing anyone down. Walk through what happens.
|
|
20
|
+
- A team wants to run it purely as a cache in front of their database, where losing data is fine but speed matters most. What would you change?
|
|
21
|
+
- Two data centres can no longer talk to each other, but clients can reach both. What do reads and writes return?
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# D17 · Collaborative document editor
|
|
2
|
+
|
|
3
|
+
Category: Web · Level: advanced · Time: 45 min
|
|
4
|
+
|
|
5
|
+
Design an online document editor where several people type in the same document at the same time. Each person sees the others' changes and cursors almost immediately, can keep editing offline, and nobody's text is lost when the edits meet.
|
|
6
|
+
|
|
7
|
+
Before you design, find out how many documents and editors there are, how many people edit one document at once, how fast others must see a change, how long people work offline, what history must be kept, and who can view or edit a document.
|
|
8
|
+
|
|
9
|
+
## If you ask
|
|
10
|
+
|
|
11
|
+
- 50 million daily users and 1 billion documents; most documents are under 100 KB of text.
|
|
12
|
+
- Usually 1 to 5 people edit a document at once, but a shared meeting document can have 200.
|
|
13
|
+
- Others should see a change within half a second. People can work offline for days and then reconnect.
|
|
14
|
+
- Everyone must end up seeing exactly the same document, and people can browse and restore earlier versions.
|
|
15
|
+
- Out of scope: images and tables inside documents, comments, and spell checking.
|
|
16
|
+
|
|
17
|
+
## Follow-ups
|
|
18
|
+
|
|
19
|
+
- A company-wide announcement document is opened by 50,000 people at once while three people edit it. What changes?
|
|
20
|
+
- Someone reconnects after two weeks offline, having rewritten a section that others deleted. What do they see?
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# D18 · AI assistant on a budget
|
|
2
|
+
|
|
3
|
+
Category: ML · Level: advanced · Time: 45 min
|
|
4
|
+
|
|
5
|
+
A customer support product adds a button that summarises a long ticket thread and drafts a reply, using a large language model. Design the system behind the button. Spending on the model has a hard monthly ceiling, answers must arrive quickly, and one large customer must not crowd out everyone else.
|
|
6
|
+
|
|
7
|
+
Before you design, find out how many companies and agents use the product, how often the button is pressed and when, how long threads are, the monthly budget and what one model call costs, how fast an answer must start appearing, and what happens when the budget or the model provider runs out.
|
|
8
|
+
|
|
9
|
+
## If you ask
|
|
10
|
+
|
|
11
|
+
- 50,000 customer companies with 2 million support agents; the button is pressed about 20 million times a day, mostly during working hours in each time zone.
|
|
12
|
+
- A thread averages 3,000 words and the longest are 50,000. A reply is about 200 words.
|
|
13
|
+
- The monthly budget is fixed at an amount that covers only about 60% of today's presses at the price of the largest model. There are also smaller models that cost a tenth as much and are less accurate.
|
|
14
|
+
- The first words should appear within 2 seconds. Customers' data must never appear in another customer's answer.
|
|
15
|
+
- Out of scope: training or fine-tuning models, and the wording of the prompt sent to the model.
|
|
16
|
+
|
|
17
|
+
## Follow-ups
|
|
18
|
+
|
|
19
|
+
- The model provider halves its rate limit for your account for a day. What do agents see?
|
|
20
|
+
- Product wants to know whether the drafts are actually good. How would you measure that, and what does the system need to record?
|
|
21
|
+
- The ten largest customers want a guaranteed share of capacity, and will pay for it. What changes?
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# D19 · Going multi-region
|
|
2
|
+
|
|
3
|
+
Category: Infrastructure · Level: advanced · Time: 45 min
|
|
4
|
+
|
|
5
|
+
An online shop's accounts and orders service runs in a single region today. Design how it will serve customers from three regions, keep working when one whole region is lost, and get there from where it is now without taking the shop down.
|
|
6
|
+
|
|
7
|
+
Before you design, find out where customers are and how much traffic each region gets, which data must be strictly correct and which can briefly disagree between regions, how much data could be lost and for how long the service could be down if a region fails, what the current system looks like, and what laws say about where data may live.
|
|
8
|
+
|
|
9
|
+
## If you ask
|
|
10
|
+
|
|
11
|
+
- Today: one region in the US, one relational database of 20 TB with a standby copy, 30,000 requests per second at peak. 40% of customers are in Europe and 20% in Asia.
|
|
12
|
+
- Target: under 100 ms per request for customers in each region, and if a region is lost, under 5 minutes of downtime and no lost orders.
|
|
13
|
+
- An order must never be placed twice or lost. Profile details such as a saved address may take a few seconds to show up elsewhere.
|
|
14
|
+
- European customers' personal data must be stored in Europe.
|
|
15
|
+
- The move must not stop the shop taking orders, and every step must be reversible. Out of scope: the product catalogue and search.
|
|
16
|
+
|
|
17
|
+
## Follow-ups
|
|
18
|
+
|
|
19
|
+
- A customer in Europe and their partner in the US change the same saved address within one second. What does each see afterwards?
|
|
20
|
+
- Halfway through the move, the new region shows a small number of orders that don't match the old one. What do you do?
|