Skip to content

ORIGINAL SYSTEM DESIGN QUESTION

Searchable work artifact library

Design a community library where learners voluntarily publish code/design artifacts and reviewers leave structured feedback. Private drafts must stay private.

Open practice workspace

Original exercise · intermediate. Editorial role relevance does not imply a company has asked this question.

Requirements and constraints

  • One million published artifacts; 10,000 new artifacts/day; read traffic exceeds writes by 20:1.
  • An artifact owner can revoke public access. Search indexes and cached copies must honor revocation.
  • Malicious uploads, spam and unauthorized access are in scope.

Pressure round

An owner revokes a widely shared artifact. Explain cache invalidation, search removal and what you cannot retract from downloaded copies.

Build and explain the design

Requirements & scope

Who uses it? What must it do? What is explicitly out of scope? State latency, durability and privacy goals.

Self-review guidance

Separate private drafts from explicitly published snapshots. Include moderation, deletion, authorship and permission semantics.

Capacity estimates

State assumptions, peak requests/second, data volume and retention. Show your arithmetic and units.

Self-review guidance

Declare artifact sizes, search/write peaks, review fan-out, retention and index amplification.

APIs & data model

Describe endpoints/events, entity keys, indexes, authorization, and idempotency.

Self-review guidance

Use artifact versions, publication permissions and structured review records. A public identifier is not sufficient authorization.

Architecture & data flow

Describe components and request/event paths. Use plain text arrows to sketch your design; explain each responsibility.

Self-review guidance

Consider transactional metadata, object storage and asynchronous search indexing. Specify authority checks on reads and publication.

Failures & observability

What happens on overload, duplicate events, partial failures or lost dependencies? Discuss monitoring and recovery.

Self-review guidance

Cover failed indexing, stale search results, bounded upload processing, audit events and permission-change propagation.

Tradeoffs & alternatives

Compare two plausible approaches. State the costs, consistency model and what would make you change the design.

Self-review guidance

Compare synchronous versus asynchronous indexing and cache reuse versus fast revocation. Avoid a promise to retract copies outside your control.

Design guidance describes assumptions and tradeoffs; no architecture has been simulated or benchmarked.

Practice this question

Save your work privately, explain decisions and return to your revision queue.

Open practice workspaceBrowse the question library →