Senior and staff-level topics

Topic 3 of 3 in Week 8: Mock interviews and revision13 min readAdvancedFree course

Overview

At senior and staff level, interviewers still ask “design X”, but they listen for different things. They expect you to drive the conversation, to notice risks before being prompted, and to reason about what happens after launch: migrations, costs, team boundaries, and how the system evolves. This lesson covers those themes so you can bring them into your answers naturally.

What changes with seniority

  • Scope: from a component to a system, then to systems across several teams.
  • Ambiguity: you’re expected to shape vague problems into clear decisions.
  • Trade-offs: not just technical, but cost, time to market, team skills and risk.
  • Lifecycle: how you’d roll it out, migrate to it, operate it and evolve it.

Migrations without downtime

Real systems rarely start from scratch; they change while serving traffic. The standard pattern is expand, migrate, contract:

Migrating data without downtime in six steps. 1, dual write: write to old and new. 2, backfill: copy history. 3, verify: compare and use shadow reads. 4, switch reads gradually, by percentage. 5, stop old writes: the new store is the truth. 6, remove the old system after a safe period. Use feature flags to move traffic step by step and keep a rollback path until step 6. Schema changes follow the same pattern: add the new column, write both, backfill, switch, then drop. Measure error rates, latency and data mismatches at every step.

Key ideas:

  • Decouple first: if other teams read your database directly, put an API in front of it before changing storage.
  • Dual writes keep both stores current (or use change data capture from the old store to the new one, which avoids inconsistencies from failed dual writes).
  • Verify with counts, checksums and shadow reads that compare old and new responses on real traffic.
  • Switch gradually with feature flags and watch SLOs at each step.
  • Keep rollback cheap until the very end.

Large refactors follow the same principle: the strangler fig pattern (week 5) moves functionality piece by piece behind a stable interface.

Build vs buy

Should you use a managed service, an open-source system you operate, or build your own?

Factor Questions
Differentiation Is this core to our product, or undifferentiated plumbing?
Total cost Licence or usage fees vs engineers to build and operate, on-call, upgrades
Time to market Weeks with a managed service vs months to build
Fit Does it support our access patterns, scale and compliance needs?
Expertise Can our team run it well at 3 a.m.?
Lock-in and exit How hard is it to move later? Are there open standards?

Default to buying or using managed services for undifferentiated infrastructure (queues, databases, search, auth), and build where it’s your competitive advantage or nothing fits.

Cost as a design dimension

Cloud bills are an architecture outcome. Show awareness:

  • Storage tiers: hot data on fast storage, old data in cheaper classes or archives.
  • Egress: serving media through CDNs; keeping chatty services in the same zone.
  • Right-sizing and autoscaling: paying for peak only when you have it.
  • Precision you don’t need: approximate counts, sampling for analytics.
  • The price of nines: each extra nine of availability can multiply cost (multi-region active-active); match the target to the business need.

A good line in an interview: “This design costs roughly X per month at our scale, mostly CDN egress; here’s how we’d reduce it if needed.”

Multi-team ownership

At scale, architecture mirrors organisation (Conway’s law). Design for it:

  • Clear ownership: every service and dataset has one owning team, on-call rota and SLOs.
  • Stable contracts: versioned APIs and event schemas, so teams can deploy independently.
  • Platform thinking: shared capabilities (auth, notifications, payments, observability) built once as platforms with self-service APIs, like the notification case study.
  • Paved roads: standard templates, libraries and deployment pipelines so new services start with good defaults.
  • Dependencies and blast radius: avoid one team’s outage taking down others (bulkheads, timeouts, degradation).

Evolving architecture

Senior answers often describe phases: “Version 1 is a modular monolith with PostgreSQL and a cache, which handles our first year. When writes exceed what one primary can handle, we shard by tenant. If the analytics load grows, we move it to a separate warehouse fed by CDC.” This shows judgement: you don’t over-build on day one, but you know where the design will go.

Design documents and influence

Staff engineers lead through writing. A good design doc includes:

  • context and goals (and non-goals),
  • requirements and constraints with numbers,
  • the proposed design, alternatives considered and why they were rejected,
  • risks, rollout and migration plan, monitoring and rollback,
  • cost estimates and open questions.

Reviews with stakeholders surface problems early and build agreement. In interviews, talking about how you’d validate a design (prototypes, load tests, reviews) signals the same maturity.

In an interview

Weave these in rather than lecturing: mention rollout and migration when replacing something, cost when choosing storage or regions, ownership when splitting services, and a phased evolution when scale is uncertain. Lead the conversation: propose which deep dives matter and why.

Recap

Senior and staff-level design adds the system’s lifecycle and organisation to the technical core. Migrate without downtime by expanding, migrating and contracting with verification and rollback; decide build vs buy on total cost, fit and differentiation; treat cost as a design dimension; design for clear multi-team ownership and stable contracts; plan architectures that evolve in phases; and communicate through clear design documents.

Exercise

Plan a migration

Your team must move user profiles from a single PostgreSQL database (2 TB, 20,000 reads/s, 500 writes/s) to a sharded store, with no downtime and no data loss. Three other teams read profiles directly from the database today. Write a migration plan covering: phases, how you verify correctness, how you roll back, how you handle the other teams, how you decide build vs buy for the new store, and how you communicate progress.

Text
Phases:

Verification:

Rollback:

Other teams / ownership:

Build vs buy:

Communication:

Summary

  • Senior interviews expect you to drive the discussion, spot risks early and reason about the system's whole lifecycle.
  • Migrate without downtime by expanding, migrating and contracting: dual writes, backfill, verification, gradual read switch and only then removal.
  • Decide build vs buy on total cost, operational burden, team expertise, differentiation and lock-in.
  • Make cost a design dimension: storage tiers, egress, right-sizing and the price of extra nines.
  • Design for multiple teams: clear ownership, stable contracts, platform thinking, and written design docs with alternatives.