Senior and staff-level topics
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:
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.
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.
Phases:
Verification:
Rollback:
Other teams / ownership:
Build vs buy:
Communication:Phases (expand → migrate → contract):
1. Put a profile service/API in front of the data; move the other teams' direct
DB reads to the API first (decouples them from the storage change).
2. Dual write: the service writes to old and new stores (new writes may be async with a
repair queue).
3. Backfill historical rows in batches, throttled to protect the primary.
4. Verify: row counts, checksums per shard, and shadow reads comparing old vs new
responses in production; fix mismatches.
5. Switch reads gradually with a feature flag (1% → 10% → 50% → 100%), watching latency
and error SLOs.
6. Make the new store the source of truth; stop writing the old one after a safe period;
decommission.
Rollback: until step 6, flip the flag back to old reads; dual writes keep the old store
current.
Other teams: announce timelines, provide the API and client library, set a deprecation
date for direct DB access, offer migration support; agree ownership of the new service.
Build vs buy: compare a managed distributed DB (e.g. a cloud-native distributed SQL or
DynamoDB) vs self-sharding (Vitess/Citus) on cost, operational load, team skills,
lock-in and fit for access patterns; prefer managed unless there's a strong reason.
Communication: a design doc with alternatives and risks, reviewed by stakeholders;
milestone updates; dashboards of migration progress and mismatch rates.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.