codejump

Architecture Case Studies

Preview — 3 of 10 questions

A URL shortener uses fixed-length six-character codes from a 62-character alphabet. Which expression gives the total code space before reserved values?

A62 factorial divided by 6 factorial.
B62 multiplied by 6.
C62 to the power of 6.
D6 to the power of 62.

A product requires the same user submitting the same normalized URL to reuse a code, while different users may have distinct codes. Which constraints fit?

AUnique normalized_url globally and no uniqueness on short_code.
BUnique short_code and unique (user_id, normalized_url).
CA distributed mutex without any durable uniqueness constraints.
DUnique user_id alone and a nonunique short_code column.

A post appears in thousands of precomputed feed lists. It is deleted at the authoritative post store. A read hydrates IDs from that store. What is a safe immediate behavior?

AOmit missing/deleted posts during hydration and clean up references asynchronously.
BRecreate deleted posts from their feed references to preserve list length.
CReturn the last cached post body forever whenever its ID remains in a feed.
DFail the entire feed if any one referenced post is deleted.

Sign up free to play

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