Architectural Walkthrough of a Past Engineering System

Medium · Behavioral & Leadership · Software Engineer · Onsite

Prompt

In an onsite engineering interview, you are asked to present an end-to-end technical walkthrough of a significant software system you architected, implemented, or drove to production.

Organize your walkthrough around five areas:

  1. Business Driver & Legacy Bottlenecks: Who relied on the workflow, what operational pain existed, and why could the prior setup no longer keep pace?
  2. Individual Role vs. Collaborators: Which services, schemas, or pipelines did you personally design and code, and how did work split across the rest of the squad?
  3. System Topology & Design Trade-offs: How did requests and data move end to end, which competing designs did you rule out, and what practical constraints guided your choice?
  4. Unexpected Failure & Root-Cause Fix: Where did an unexpected edge case, load pattern, or production defect break your initial build, how did you prove the cause, and what changed in code?
  5. Measured Outcomes & Remaining Debt: How did reliability, speed, or user metrics shift after rollout, what fragile edges stayed behind, and how would you approach the build differently now?

Scope & Expectations

  • Concrete implementation fluency: Move smoothly from high-level component boundaries down to transactions, concurrency controls, retries, and storage schemas without relying on vague slogans.
  • Honest attribution: Draw a crisp boundary between your personal contributions and your teammates' work while crediting collaborators fairly.
  • Constraint-backed decisions: Defend architectural choices using real team size, timeline, traffic patterns, and operational overhead rather than presenting a textbook ideal.
  • Reflective engineering judgment: Volunteer real flaws, deferred edge cases, and lessons learned instead of framing the project as trouble-free.

Step-by-step walkthrough

  1. What the interviewer is really testing

    A technical project deep-dive is an interactive stress test where the interviewer keeps asking "why did you choose that?" and "what happens when this box crashes?" until they reach the boundary of your firsthand knowledge. Across those ten to fifteen minutes, they grade four signals:

    • Depth down to real mechanisms: Moving effortlessly from boxes on a whiteboard down to timeouts, database transactions, retry behavior, and failure recovery—rather than hiding behind buzzwords like "cloud-native microservices."
    • Clear personal ownership: Separating what you designed and coded ("I") from what teammates built ("my teammate owned..."), giving generous credit without obscuring your own role.
    • Pragmatic trade-offs: Naming two or three realistic alternatives you rejected and tying your decision to concrete project constraints (team size, operational familiarity, traffic shape, deadline) rather than industry hype.
    • Post-mortem honesty: Describing a genuine production or beta bug, the exact evidence that revealed its root cause, and the architectural compromises you would replace today.

    Legora builds a collaborative AI platform used by lawyers to research, review, and draft large volumes of legal documents. Choosing a project involving document ingestion, reliable background pipelines, or data extraction resonates naturally with their problem space, though deep ownership of any backend or infrastructure system beats forcing a shallow domain match.

  2. Pick the right project to defend

    Filter your past projects through five practical checks before your interview:

    1. You drove the core technical decisions: A medium-sized system you architected beats a famous fifty-person platform where you owned one small configuration change.
    2. You still remember low-level details from the past two or three years (table keys, queue timeouts, rough throughput numbers).
    3. Something broke under real data and you personally helped diagnose and fix it—without a real setback, you lose the richest section of the prompt.
    4. You have concrete before-and-after numbers, such as error rate or p95 latency (the response time that 95% of requests finish within, capturing slow tail behavior better than a simple average).
    5. It fits into five or six whiteboard boxes without exposing confidential employer secrets.
  3. Map your 10-minute walkthrough and architecture sketch

    Follow the five parts of the prompt in sequence, aiming for roughly three minutes as your opening overview so plenty of time remains for interactive follow-up questions:

    1. Legacy Bottleneck (~45s)     Who was hurt, baseline failure rate, why sync broke.
    2. Individual Role (~20s)       Your exact code & design boundary vs. collaborators.
    3. Topology & Trade-offs (~60s) Data flow + 2 ruled-out designs + why this fit best.
    4. Failure & Root-Cause (~45s)  Symptom -> root-cause evidence -> 3-part code fix.
    5. Outcomes & Debt (~30s)       Before/after metrics + the most fragile edge left behind.
    

    Before speaking, practice sketching the architecture cleanly. Notice two concepts in the diagram below: OCR (optical character recognition, software that turns scanned page images into searchable text) and SQS (Amazon Simple Queue Service, a managed message queue that holds background tasks until worker servers finish them):

     Upload API ──(1) save raw PDF──► Object Storage (S3)
         │
         ├──(2) insert job & batch rows──► PostgreSQL (`jobs`, `job_batches`, `clauses`)
         │                                    │                       ▲
         │                      (sweeper re-queues stuck              │ (5) single-tx write:
         │                        PENDING rows > 60s)                 │     clauses + COMPLETED
         ▼                                    ▼                       │
       SQS Queue ◄─────────────────────── Sweeper             Stateless Worker Pool
         │                                                       (OCR + extract)
         ├──(3) pull 50-page batch task───────────────────────────────┘
         │      + (4) heartbeat extends visibility timeout
         ▼
       SQS Dead-Letter Queue (after 5 failed attempts) ──► marks job FAILED in PostgreSQL
    
  4. Full first-person sample answer

    Here is a spoken opening walkthrough (~300 words, roughly two and a half minutes aloud) from a backend engineer interviewing for a Software Engineer role at Legora. In a live interview, pause briefly between sections or invite the interviewer to zoom into whichever box interests them.

    At my previous company, a contract-management platform, customers uploaded PDFs so we could extract renewal dates and liability caps. Originally, everything ran synchronously inside the HTTP upload request: parse the PDF, run OCR on scans, extract clauses, and return. When law firms began uploading 2,000-document deal rooms, 4% of uploads timed out and large scans never finished.

    On a three-engineer team, I was the technical lead. I wrote the design, built the job orchestration and retry logic, and led the rollout; one teammate owned the OCR integration and another built the progress UI.

    In the new design, the upload API saves the PDF to object storage, inserts a job row in PostgreSQL, and enqueues a task on Amazon SQS, with a one-minute sweeper re-queuing any job stranded if a server crashes between writes. Stateless workers process tasks and update PostgreSQL as the single source of truth. We rejected Kafka because our three-person team had never operated it and did not need log replay, and rejected a PostgreSQL-only queue to avoid heavy polling on our primary database during upload spikes.

    In week one of beta, several contracts showed duplicate clauses. SQS delivers messages at least once, and OCR on a 400-page scan exceeded our 15-minute visibility timeout, so SQS revealed the message to a second worker. Grouping affected files by page count proved all were over 200 pages. I split documents into 50-page batches, added a worker heartbeat extending the timeout while active, and wrote each batch's clauses plus its COMPLETED marker in one PostgreSQL transaction so duplicate workers exited cleanly.

    Upload failures fell from 4% to 0.3%, and p95 completion for a 2,000-document room reached 25 minutes. Looking back, my custom PostgreSQL fan-in check was our most fragile code; today I would use a dedicated workflow engine.

  5. Prepare one level deeper on failure modes

    Once your overview lands, strong interviewers immediately probe failure edges. Know the exact mechanics behind every term you introduced:

    • Why did the visibility timeout cause duplicates? An SQS visibility timeout is the window during which a fetched message stays hidden from other workers; if the first worker has not deleted it before that timer expires, SQS assumes the worker crashed and hands the message out again (at-least-once delivery). Adding a heartbeat (a background timer calling ChangeMessageVisibility every few minutes while the worker process is still healthy) stops long scans from timing out prematurely.
    • Why commit clauses and COMPLETED inside one database transaction? Relying on text offsets alone to deduplicate clauses can fail if two OCR runs produce slightly different whitespace. Checking WHERE status != 'COMPLETED' on (document_id, pipeline_version, batch_index), inserting that batch's clauses, and setting status = 'COMPLETED' inside a single PostgreSQL transaction makes every batch write idempotent (safe to run multiple times with the exact same final state).
    • What happens to corrupt or password-protected PDFs (the remaining 0.3%)? Fast deterministic errors mark the job FAILED_UNREADABLE immediately with a clear user message; transient crashes retry up to five times before SQS moves the message to a dead-letter queue (a quarantine queue for repeatedly failing messages) whose consumer marks the job failed in PostgreSQL and pages on-call if volume spikes.
    • How did you roll it out safely? Behind a per-customer feature flag, starting in shadow/beta mode with two law firms that had previously hit timeouts so we could validate throughput and extraction parity against known deal rooms before moving 100% of traffic.

Intuition & how it works

Think of a technical project deep-dive like defending a thesis blueprint in front of a seasoned building inspector. Anyone can point to a glossy photo of a finished house and say "we used steel beams," so the inspector ignores slogans and asks pointed questions instead: Why steel instead of timber on this soil? Which load calculations did you run yourself? What cracked during the first winter storm, and how did you patch the foundation?

Naive walkthroughs fall flat for three reasons. Candidates either stay at 30,000-foot buzzword altitude ("we moved to event-driven microservices for scale"), blur team work and personal work behind a constant "we," or present a fairy-tale project where nothing ever went wrong—leaving the interviewer skeptical that they actually built the hard parts.

A convincing deep-dive walks down a clear five-rung ladder from business pain to low-level failure handling:

1. Pain & Baseline   2,000-PDF uploads running synchronously -> 4% HTTP timeouts.
2. Ownership         Tech lead of 3: I built async queue orchestration + retries.
3. Trade-off         Picked S3 + PostgreSQL + SQS over Kafka (ops cost) & DB polling.
4. Production Bug    400-page OCR beat 15m SQS visibility timeout -> duplicate clauses;
                     fixed via 50-page batches, heartbeats, and single-tx batch writes.
5. Impact & Debt     Failures 4% -> 0.3%, p95 = 25m; custom DB fan-in is what I'd replace.

What interviewers look for

  • Concrete problem framing before architecture: Explaining why the old synchronous design (doing all slow work while the user's HTTP request waits open) broke under real customer load, backed by a baseline failure rate.
  • Crisp "I" vs. "we" boundaries: Explicitly naming the components you designed, coded, and debugged while crediting teammates by role for adjacent pieces like OCR (optical character recognition, converting scanned images into text) or frontend progress views.
  • Constraint-driven trade-offs: Comparing your asynchronous design (accepting the upload immediately and processing work in the background via a message queue) against credible alternatives like Apache Kafka or PostgreSQL SKIP LOCKED, and rejecting them based on team size, traffic bursts, and operational cost rather than dogma.
  • Mastery of distributed failure modes: Fluency with at-least-once delivery (queues guaranteeing a message is delivered one or more times, meaning duplicates can occur), visibility timeouts (how long a queue hides an in-progress message from other workers), heartbeats (periodic signals proving a worker is still alive), idempotency (ensuring repeated execution produces the same database state without duplicates), and dead-letter queues (holding areas for poison messages that fail repeatedly).
  • Evidence-based debugging: Showing how you proved the root cause of a setback (grouping duplicate jobs by page count and seeing every culprit exceeded 200 pages) before writing the fix.
  • Quantified results and proactive self-critique: Pairing clear metrics—like error rate and p95 latency (the time within which 95% of jobs complete)—with candid reflection on remaining technical debt such as brittle fan-in logic (waiting for all parallel sub-tasks of a job to finish before marking the parent complete).

Common mistakes

  • Choosing the flashiest company project over the one you owned: If you only wrote a small adapter on a massive initiative, you will stall two questions into architectural trade-offs.
  • Spending six minutes on business background: Burning half the interview on product history leaves almost no time for design choices, debugging, and trade-offs.
  • Hand-waving dual writes and retries: Saying "we wrote to Postgres and pushed to SQS" without knowing what happens if the server dies in between, or if SQS delivers a message twice.
  • Presenting a zero-flaw system: Claiming there were no bugs and nothing you would change today signals either shallow involvement or lack of senior engineering judgment.
  • Bluffing when you forget a number: Guessing a fake database limit under pressure destroys trust instantly; saying "I don't recall the exact figure, though it was on the order of a few hundred connections and here is how we monitored it" earns respect.

Follow-up questions

  • Suppose workload volume jumped 50x tomorrow—which component becomes the primary bottleneck first, and how would you re-architect around it? Our PostgreSQL primary database would saturate first: 50× more workers opening direct connections would blow past PostgreSQL's max_connections ceiling (typically a few hundred), and per-batch status updates plus counter locks would contend heavily on write I/O. Immediately behind that, external OCR API rate limits would throttle throughput, and a single law firm uploading 100,000 files could starve smaller customers in one FIFO-like backlog. To handle 50× scale, I would place a connection pooler like PgBouncer (a lightweight proxy that multiplexes thousands of worker connections onto a small pool of database connections) in front of PostgreSQL, replace hot parent-row counters with append-only batch rows or a dedicated workflow engine, enforce per-tenant fair queuing so one bulk upload cannot monopolize workers, and cap worker autoscaling just below our OCR quota. Standard SQS itself handles nearly unlimited request throughput, watching only its 120,000 in-flight message limit per queue.
  • Describe a debate with another engineer or partner over a design decision on this system and how you reached alignment. A senior engineer on an adjacent team advocated strongly for Apache Kafka instead of SQS so data analytics could replay historical document-processing events later. My concern was that none of the three engineers on our team had run Kafka in production, and standing it up safely would jeopardize our timeline for a replay feature nobody had requested yet. Together we wrote a one-page comparison weighing our concrete constraints—per-document retry isolation, bursty deal-room traffic, operational staffing, and analytics visibility—and reviewed it with our engineering manager. We agreed to ship on SQS while emitting a lightweight "document.completed" event onto the company's existing analytics webhook bus, giving analytics every metric they needed without taking on a new distributed broker, and documented exact scale triggers for revisiting Kafka later.
  • Which single tool, dependency, or subsystem in your final implementation would you replace first if given another pass, and why? I would replace the custom fan-in state machine I hand-coded around PostgreSQL row locks to detect when all 50-page batches of a document had finished. Mixing workflow orchestration state into our application database tables made race conditions between simultaneous last-batch completions and partial retries painfully subtle to test, and caused our only two post-launch stuck-job bugs. Swapping that custom coordinator for a purpose-built workflow engine—such as Temporal or AWS Step Functions, which manages multi-step task state, timeouts, retries, and parallel fan-in out of the box—would have eliminated hundreds of lines of fragile state-transition code. Avoiding a new dependency felt pragmatic under a tight three-person deadline, yet over twelve months of maintenance a managed workflow service would have paid for itself many times over.

Follow-up questions

Similar questions

More Legora interview questions

All 7 Legora questions →