codejump

System Design Expert

Preview — 3 of 10 questions

A materialized feed contains posts from an account a user just unfollowed. The product requires immediate removal from displayed results. Which read path meets that requirement?

AWait only for an eventual background deletion with no read filtering.
BTreat every precomputed inbox row as permanently authorized.
CIncrease the materialized feed's TTL so results remain stable.
DFilter using current relationship state until cleanup completes.

A spatial index finds the closest drivers by straight-line distance. The product must minimize pickup time across rivers and road restrictions. What should happen next?

ARun a full route search for every driver worldwide on every request.
BIgnore road restrictions when location updates arrive frequently.
CChoose the smallest straight-line distance as a guaranteed minimum ETA.
DRank a bounded candidate set using road-network travel-time estimates.

A webhook changes only local SQL state. Multiple instances may receive duplicates. Which transaction design is sound?

ACommit an event marker, then update state later without recovery tracking.
BInsert a unique event marker and apply the state change in the same transaction.
CAcquire a short Redis lock and forget the event ID after releasing it.
DCheck for a marker with SELECT, then update without an atomic claim.

Sign up free to play

Answer all 10 questions (7 more), see explanations for every answer, and track your score.