In 1 minute
- Trace the product flow and make contracts explicit before adding tools.
- In autocomplete, debouncing controls frequency; the application still needs to reject stale responses.
- For uploads, distinguish completed transfer from file availability and explain failures and recovery.
System design examples show how the same sequence of questions can produce different architectures. Each case starts with a product assumption, traces the data flow and ends with failures and alternatives. These are proposed solutions for an exercise, not universal recipes. If a requirement changes, you should be able to identify the decision that needs revisiting.
The scenarios are search suggestions, a chronological feed and file uploads. The focus is contracts and reasoning rather than complete implementations. If you need a discussion structure, start with the system design method. Then sketch each flow without looking at the text and compare the gaps in your proposal.
Working through the system design examples
Take the perspective of someone using the product. Ask what they want to do, which response they expect and what must survive a failure. Draw technical parts afterward. A single arrow can hide authentication, size limits or retry rules; write those conditions near the contract rather than relying on memory during the presentation.
- Confirm the scenario and record exclusions.
- Draw the main read or write path.
- Define identity, ordering and response states.
- Introduce a failure and explain recovery.
- Compare an alternative and the requirement that would justify it.
Use the same criteria for all three cases. That keeps each problem from becoming an isolated collection of tools. When a requirement is missing, make a limited assumption that lets you proceed and explain which answer from the interviewer would change your design.
Autocomplete: requirements, requests and response ordering
Consider a product search that offers suggestions as you type. First establish whether users must choose a suggestion or can submit arbitrary text. Assume remote suggestions, bounded responses and no offline requirement. The client holds the current text, schedules a query after a pause and sends the term to an endpoint. The server validates the query and returns identifiers and labels without unnecessary internal fields.
Do
- Introduce a race: an old query may finish after a newer one. Cancelling earlier requests reduces work, but the application must also prevent stale results from replacing current results.
- Define query identity and the condition for accepting a response. On failure, preserve the text and allow continued use according to the product contract.
Avoid
- Treating debouncing as an ordering guarantee: it controls frequency.
- Confusing errors with no suggestions.
Finally, describe keyboard navigation, the active option and loading announcements. Compare local search when the dataset is small and stable. For state and effect decisions without implementing this entire scenario, use the React challenge guide. The async autocomplete practice challenge is Pro.

Feed: pagination, ordering and refresh
Assume a chronological feed without personalized ranking. First define stable ordering by creation time with an identifier as a tie-breaker. The server returns items and an opaque cursor for the next page. The client does not need to interpret it. When loading more, it appends by identity and avoids duplicate display. The contract must clarify whether pages represent a fixed snapshot or a changing collection.
Next, introduce new posts during reading. One option is to announce new items and let the reader refresh, preserving their position until that action. This avoids moving content while it is being read. If one page fails, retain previous pages and retry that load. Cursors alone do not solve deletions, permission changes or every consequence of a mutable collection.
Compare offset pagination when direct access to numbered pages is required. Explain how concurrent insertions affect that model. On the client, discuss browser history, focus and possible virtualization using the front-end architecture guide. The following type documents only the received page.
type FeedItem = {id: string;createdAt: string;text: string;};type FeedPage = {items: FeedItem[];nextCursor: string | null;};
Uploads: transfer, progress and failure recovery
Open the session
Consider private attachments with a size limit. First the client requests an upload session; the server checks authorization and constraints and returns a temporary destination.
Transfer and associate
The file goes to storage, and a later confirmation associates the object with a product record.
Distinguish states
Separate completed transfer from available file: validation or processing may continue after all bytes arrive.
Then introduce a network interruption. Restarting may be enough for small files; large files may justify multipart recovery with additional session tracking and abandoned-part cleanup. An expired temporary URL requires renewed authorization, not endless retries to the same address. Do not accept files based only on extension or the type reported by the browser.
Finally, define cancellation, expiry and idempotent confirmation. The interface should distinguish transfer, processing and recoverable failure. Percentage progress depends on transport and available information; do not fabricate it. Explain how unvalidated files remain unavailable for download and how unattached objects are removed after abandoned attempts.
Decisions that differ across the three cases
In autocomplete, the central risk is displaying a response that no longer matches current intent. In feeds, it is losing continuity and ordering as the collection changes. In uploads, it is confusing byte delivery with operation completion. Write a contract check and failure story for each risk. The front-end testing guide helps distribute those checks across test levels.
Frequently asked questions
Which system design examples can I practice?
Suggestions, feeds and uploads exercise different read and write problems. Start with limited requirements and add one failure per round, explaining each new responsibility.
How do I design autocomplete in an interview?
Define suggestion sources, query identity, update rules and keyboard interaction. Then discuss delayed requests, stale responses and failures without treating debounce as a concurrency solution.
How do I design a paginated feed?
Agree on stable ordering and a continuation contract. Explain new posts, removals, retries and reading continuity. Choose cursors or offsets according to those needs.
How do I explain a file upload system?
Separate authorization, transfer, validation and availability. Show what happens when each phase fails and how attempts resume or terminate. Include cleanup of abandoned files.
Practice with real tests
Solve front-end exercises in the browser, with the same tests a reviewer would run.
See the exercises